-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.17 KB
/
Coverage.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Coverage
on:
pull_request:
jobs:
coverage:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
- name: Validate Gradle wrapper
uses: gradle/wrapper-validation-action@v1
- name: Setup JDK 17
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.9'
cache: 'pip'
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Generate XML coverage report (JaCoCo)
run: ./gradlew forage-android:koverXmlReport
- name: Verify coverage
run: |
diff-cover \
forage-android/build/reports/kover/xml/report.xml \
--src-roots "forage-android/src/main/java" \
--compare-branch origin/${{ github.event.pull_request.base.ref }} \
--fail-under 80