Skip to content

Commit

Permalink
Merge branch 'develop' for release 3.7.0 (attempt #1)
Browse files Browse the repository at this point in the history
  • Loading branch information
kelson42 committed May 29, 2023
2 parents 824b3f9 + 8e4fd41 commit 21c5c55
Show file tree
Hide file tree
Showing 417 changed files with 12,560 additions and 8,813 deletions.
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ coverage:
threshold: 1%
patch:
default:
target: 90%
target: 70%
threshold: 0%

ignore:
Expand Down
95 changes: 95 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
name: CI

on:
push:
branches:
- main
- develop
pull_request:

jobs:

automated-tests:
name: Automated tests
strategy:
matrix:
api-level: [ 21, 30, 33 ]
fail-fast: false
runs-on: macos-11
steps:
- name: checkout
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 11

- name: Restore Cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: create instrumentation coverage
uses: ReactiveCircus/android-emulator-runner@v2
env:
GRADLE_OPTS: "-Dorg.gradle.internal.http.connectionTimeout=60000 -Dorg.gradle.internal.http.socketTimeout=60000 -Dorg.gradle.internal.network.retry.max.attempts=6 -Dorg.gradle.internal.network.retry.initial.backOff=2000"
if: ${{ matrix.api-level != 33 }}
with:
api-level: ${{ matrix.api-level }}
target: default
arch: x86_64
profile: pixel_2
ram-size: '4096M'
disk-size: '14G'
sdcard-path-or-size: '1000M'
disable-animations: false
script: bash contrib/instrumentation.sh

- name: create instrumentation coverage on google_apis for android 33
uses: ReactiveCircus/android-emulator-runner@v2
env:
GRADLE_OPTS: "-Dorg.gradle.internal.http.connectionTimeout=60000 -Dorg.gradle.internal.http.socketTimeout=60000 -Dorg.gradle.internal.network.retry.max.attempts=6 -Dorg.gradle.internal.network.retry.initial.backOff=2000"
if: ${{ matrix.api-level == 33 }}
with:
api-level: ${{ matrix.api-level }}
target: google_apis
arch: x86_64
profile: pixel_2
heap-size: '512M'
ram-size: '4096M'
disk-size: '14G'
sdcard-path-or-size: '4096M'
disable-animations: false
script: bash contrib/instrumentation.sh

- name: Upload screenshot result
uses: actions/upload-artifact@v3
if: failure()
with:
name: ${{ matrix.api-level }}
path: screencap.png

- name: create unit coverage
if: ${{ matrix.api-level==21 }}
run: ./gradlew testDebugUnitTest testCustomexampleDebugUnitTest

- name: Upload coverage to Codecov
if: ${{ matrix.api-level==21 }}
uses: codecov/codecov-action@v3

- name: Upload Coverage to GH-Actions
uses: actions/upload-artifact@v3
if: ${{ matrix.api-level==21 }}
with:
name: Tests Coverage Report
path: |
**/reports/
65 changes: 0 additions & 65 deletions .github/workflows/coverage.yml

This file was deleted.

36 changes: 36 additions & 0 deletions .github/workflows/fdroid_nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Publish nightly build

on:
pull_request:
branches:
- testing

jobs:
nightly:
name: Publish nightly build
runs-on: ubuntu-22.04
environment: nightly
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin

- name: Build
run: |
# use timestamp as Version Code
export versionCode=$(date '+%s')
sed -i "s,^\(\s*versionCode\) *[0-9].*,\1 $versionCode," app/build.gradle.kts
./gradlew assembleDebug
- name: fdroid nightly
run: |
sudo add-apt-repository ppa:fdroid/fdroidserver
sudo apt-get update
sudo apt-get install apksigner fdroidserver --no-install-recommends
export DEBUG_KEYSTORE=$\{\{ secrets.DEBUG_KEYSTORE \}\}
fdroid nightly --archive-older 10
52 changes: 6 additions & 46 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,8 @@ on:

jobs:

instrumentation_tests:
strategy:
matrix:
api-level: [21, 22, 23, 24, 25, 27, 28, 30]
fail-fast: false
runs-on: macOS-latest
release:
runs-on: ubuntu-22.04
steps:

- name: checkout
Expand All @@ -21,49 +17,13 @@ jobs:
fetch-depth: 1

- name: Set up JDK 11
uses: actions/setup-java@v1
uses: actions/setup-java@v3
with:
java-version: 11

- name: run instrumentation tests
uses: ReactiveCircus/[email protected]
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
ndk: 21.4.7075529
sdcard-path-or-size: '1000M'
disable-animations: false
script: bash contrib/instrumentation_nightly.sh

- name: Upload screenshot result
uses: actions/upload-artifact@v1
if: failure()
with:
name: ${{ matrix.api-level }}
path: screencap.png

unit_test_and_release:
runs-on: ubuntu-18.04
steps:

- name: checkout
uses: actions/checkout@v1
with:
fetch-depth: 1

- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11

- name: Install NDK
run: echo "y" | sudo ${ANDROID_HOME}/tools/bin/sdkmanager --install "ndk;22.0.7026061" --sdk_root=${ANDROID_SDK_ROOT}

- name: run unit tests
run: ./gradlew testDebugUnitTest testCustomExampleDebugUnitTest
distribution: temurin

- name: build debug
run: ./gradlew assembleDebug
run: ./gradlew assembleNightly

- name: Decrypt files
env:
Expand All @@ -77,7 +37,7 @@ jobs:

- name: release debug to kiwix.download.org
env:
UNIVERSAL_DEBUG_APK: app/build/outputs/apk/debug/*universal*.apk
UNIVERSAL_DEBUG_APK: app/build/outputs/apk/nightly/*universal*.apk
run: |
mkdir $DATE
cp $UNIVERSAL_DEBUG_APK $DATE
Expand Down
Loading

0 comments on commit 21c5c55

Please sign in to comment.