mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-09-21 03:02:59 -04:00
99 lines
2.9 KiB
YAML
99 lines
2.9 KiB
YAML
name: Coverage Reporting
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- develop
|
|
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
|
|
coverageReport:
|
|
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@v2
|
|
with:
|
|
distribution: temurin
|
|
java-version: 11
|
|
|
|
- name: Restore Cache
|
|
uses: actions/cache@v2
|
|
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.25.0
|
|
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
|
|
ndk: 21.4.7075529
|
|
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.25.0
|
|
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
|
|
ndk: 21.4.7075529
|
|
ram-size: '4096M'
|
|
disk-size: '14G'
|
|
sdcard-path-or-size: '1000M'
|
|
disable-animations: false
|
|
script: bash contrib/instrumentation.sh
|
|
|
|
- name: Upload screenshot result
|
|
uses: actions/upload-artifact@v2
|
|
if: failure()
|
|
with:
|
|
name: ${{ matrix.api-level }}
|
|
path: screencap.png
|
|
|
|
- name: create unit coverage
|
|
if: ${{ matrix.api-level==21 }}
|
|
run: ./gradlew jacocoTestDebugUnitTestReport jacocoTestCustomExampleDebugUnitTestReport
|
|
|
|
- name: Upload coverage to Codecov
|
|
if: ${{ matrix.api-level==21 }}
|
|
uses: codecov/codecov-action@v2
|
|
|
|
- name: Upload Coverage to GH-Actions
|
|
uses: actions/upload-artifact@v2.2.0
|
|
if: ${{ always() }}
|
|
with:
|
|
name: Tests Coverage Report
|
|
path: |
|
|
**/reports/
|