-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (55 loc) · 1.74 KB
/
androidTest.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
name: androidTest
on:
pull_request:
branches: [ '*' ]
push:
branches: [ master, development ]
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Checkout
uses: actions/checkout@v2
- name: set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'temurin'
cache: 'gradle'
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Run local tests
run: ./gradlew testDebug --stacktrace
- name: Create AVD and Run androidTest
id: testing
uses: reactivecircus/android-emulator-runner@v2
continue-on-error: true
env:
ANDROID_EMULATOR_WAIT_TIME_BEFORE_KILL: 500
with:
api-level: 29
emulator-build: 7425822
force-avd-creation: true
emulator-options: -wipe-data -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
echo "Generated AVD snapshot for caching."
./gradlew connectedCheck
- name: Upload Failing Test Report Log
if: steps.testing.outcome != 'success'
uses: actions/upload-artifact@v3
with:
name: logs
path: app/build/outputs/androidTest-results/connected/flavors/*/failed/*.png
- name: Upload build outputs (APKs)
uses: actions/upload-artifact@v3
with:
name: build-outputs
path: ./app/build/outputs/**/*.apk
- name: Upload build reports
if: always()
uses: actions/upload-artifact@v3
with:
name: build-reports
path: ./app/build/reports