generated from mcatta/android-compose-template
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.08 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
name: Build & Test
on:
push:
branches: [ main, 'feat/**', 'chore/**', 'fix/**' ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.2.1
- name: set up JDK 18
uses: actions/setup-java@v4
with:
java-version: '18'
distribution: 'zulu'
cache: gradle
- name: Create google-services.json
run: |
echo '${{ secrets.FIREBASE_GOOGLE_SERVICES_JSON }}' > app/google-services.json
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Check & Test
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: 29
script: ./gradlew createDebugCoverage
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test report artifact
if: ${{ failure() }}
uses: actions/upload-artifact@v4
with:
name: sleep-app-test-report
path: /home/runner/work/sleep/sleep/app/build/reports/lint-results-debug.html