-
Notifications
You must be signed in to change notification settings - Fork 8
64 lines (58 loc) · 1.95 KB
/
android.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
name: Android tests and example
on: pull_request
jobs:
example:
runs-on:
ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: build example
run: ./gradlew --stacktrace android:assembleDebug
working-directory: example
test:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17
- name: run Android unit tests
run: ./gradlew testDebugUnitTest koverHtmlReport koverXmlReport
- name: add coverage report to PR
id: kover
uses: mi-kas/kover-report@v1
# this action fails if there is no report, unlike the above actions, so check if there are files
if: ${{ always() && hashFiles(format('{0}/build/reports/kover/report.xml', github.workspace)) != '' }}
with:
path: ${{ github.workspace }}/build/reports/kover/report.xml
token: ${{ secrets.CI_SPLENDO_PAT }}
title: Code coverage
update-comment: true
coverage-counter-type: LINE
- name: Upload Android test artifact
uses: actions/upload-artifact@v4
if: failure()
with:
name: "Android Test Report HTML"
path: "**/build/reports/tests/testDebugUnitTest"
- name: Upload Coverage report
uses: actions/upload-artifact@v4
if: ${{ always() && hashFiles(format('{0}/build/reports/kover/html/index.html', github.workspace)) != '' }}
with:
name: "Android Test Report HTML"
path: "**/build/reports/kover/html"
- name: run apiCheck
run: ./gradlew apiCheck