-
Notifications
You must be signed in to change notification settings - Fork 627
37 lines (37 loc) · 1.2 KB
/
android_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
name: "Android CI"
on: [ push, pull_request ]
jobs:
test:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- name: checkout repository
uses: actions/checkout@v4
- name: set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: '17'
- name: lint
run: bash ./gradlew lintDebug --stacktrace
- name: unit tests
run: bash ./gradlew testDebugUnitTest --stacktrace
- name: coverage
run: bash ./gradlew jacocoTestCoverageVerification --stacktrace
- name: artifact reports
uses: actions/upload-artifact@v4
with:
name: artifact-reports
path: app/build/reports
- name: upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml
- name: build apk
run: bash ./gradlew assembleDebug --stacktrace
- name: artifact apk
uses: actions/upload-artifact@v4
with:
name: artifact-apk
path: app/build/outputs/apk/debug