mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 02:36:24 -04:00
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: Coverage Reporting
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
- develop
|
|
|
|
pull_request:
|
|
branches:
|
|
- '**'
|
|
|
|
jobs:
|
|
|
|
coverageReport:
|
|
strategy:
|
|
matrix:
|
|
api-level: [21, 29]
|
|
fail-fast: false
|
|
runs-on: macOS-latest
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v1
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: create instrumentation coverage
|
|
uses: ReactiveCircus/android-emulator-runner@v2.8.0
|
|
with:
|
|
api-level: ${{ matrix.api-level }}
|
|
arch: x86_64
|
|
ndk: 21.1.6352462
|
|
script: bash contrib/instrumentation.sh
|
|
|
|
- name: Upload screenshot result
|
|
uses: actions/upload-artifact@v1
|
|
if: failure()
|
|
with:
|
|
name: ${{ matrix.api-level }}
|
|
path: screencap.png
|
|
|
|
- name: create unit coverage
|
|
run: ./gradlew jacocoTestDebugUnitTestReport jacocoTestCustomExampleDebugUnitTestReport
|
|
|
|
- name: Upload coverage to Codecov
|
|
run: |
|
|
bash <(curl -s https://codecov.io/bash) -t ${{ secrets.CODECOV_TOKEN }}
|