-
Notifications
You must be signed in to change notification settings - Fork 11
62 lines (51 loc) · 1.64 KB
/
ci-gradle.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
name: CI
on:
push:
branches: [ main ]
pull_request:
release:
types: [ released ]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
gradle-test:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout Branch
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- uses: actions/cache@v4
with:
path: |
~/.m2/repository/org/robolectric
key: robolectric-${{ hashFiles('.github/fetch-robolectric-dependencies.sh') }}
restore-keys: |
robolectric-
- name: Fetch Robolectric dependencies
run: /bin/sh .github/fetch-robolectric-dependencies.sh
# Build the entire project, run the tests, and run all static analysis
- name: Gradle Build
run: ./gradlew assembleRelease testReleaseUnitTest detekt lint apiCheck --stacktrace
- name: Archive Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v4
with:
name: android-sdk-test-results
path: embrace-android-sdk/build/reports/tests/
- name: Run Kover Code Coverage
run: ./gradlew koverXmlReportRelease
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: false
file: embrace-android-sdk/build/reports/kover/reportRelease.xml