-
Notifications
You must be signed in to change notification settings - Fork 30
54 lines (54 loc) · 1.89 KB
/
main.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
name: Build, Test and Distribute
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Setup Android SDK
uses: android-actions/setup-android@v3
- name: Build
run: "./gradlew assembleDebug"
- name: Check
run: "./gradlew testDebug jacocoTestReport lintDebug buildDashboard"
- name: Distribute
run: |
echo '${{ secrets.FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON }}' > $RUNNER_TEMP/credentials.json
export FIREBASE_APP_DISTRIBUTION_SERVICE_ACCOUNT_JSON=$RUNNER_TEMP/credentials.json && ./gradlew appDistributionUploadDebug
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: vgaidarji/ci-matters
androidTest:
runs-on: ubuntu-latest
strategy:
matrix:
api-level: [ 34 ]
steps:
- uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: 17
- name: Enable KVM
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- name: Gradle cache
uses: gradle/actions/setup-gradle@v3
- name: Instrumentation Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.api-level }}
arch: x86_64
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew connectedAndroidTest --stacktrace