-
Notifications
You must be signed in to change notification settings - Fork 0
101 lines (82 loc) · 2.72 KB
/
ci.yml
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
name: continuous integration
on:
pull_request:
concurrency:
group: build-${{ github.ref }}
cancel-in-progress: true
jobs:
qa:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Build app variants
run: ./gradlew assemble --stacktrace
- name: Run unit tests
run: ./gradlew testDebugUnitTest --stacktrace --no-daemon
- name: Publish Test Report Unit Tests
uses: mikepenz/action-junit-report@v4
if: always()
with:
report_paths: "app/build/test-results/testDebugUnitTest/TEST-*.xml"
- name: Check static analysis with detekt and lint
run: ./gradlew detekt lintDebug --continue --no-daemon
if: always()
- name: Upload detekt report
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: app/build/reports/detekt/detekt.sarif
category: detekt
- name: Upload lint report
uses: github/codeql-action/upload-sarif@v2
if: always()
with:
sarif_file: app/build/reports/lint-results-debug.sarif
category: lint
- name: Generate kover coverage report
run: ./gradlew koverXmlReportDebug
- name: Upload coverage report to PR
if: ${{ github.repository_owner == github.actor }}
id: kover
uses: mi-kas/kover-report@v1
with:
path: app/build/reports/kover/reportDebug.xml
token: ${{ secrets.GITHUB_TOKEN }}
title: Code Coverage
update-comment: true
min-coverage-changed-files: 80
coverage-counter-type: LINE
android_tests:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: 17
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
disable-animations: true
disk-size: 6000M
heap-size: 600M
script: ./gradlew connectedAndroidTest --continue --no-daemon
- name: Publish Test Report of Instrumentation Tests
uses: mikepenz/action-junit-report@v4
if: always()
with:
check_name: "Instrumentation Test Report"
report_paths: "app/build/outputs/androidTest-results/connected/TEST-*.xml"