-
Notifications
You must be signed in to change notification settings - Fork 4
74 lines (66 loc) · 2.33 KB
/
ui-test.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
63
64
65
66
67
68
69
70
71
72
73
74
name: Ui Test
on: pull_request
jobs:
ui-tests:
timeout-minutes: 25
runs-on: macos-latest
env:
androidApiVersion: 31
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Fetch Gradle Wrapper Cache
uses: actions/cache@v2
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-wrapper-${{ hashFiles('**/gradle-wrapper.properties') }}
- name: Fetch Gradle Cache
uses: actions/cache@v2
continue-on-error: true
with:
path: |
~/.gradle/caches/modules-*
~/.gradle/caches/jars-*
~/.gradle/caches/build-cache-*
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/Dependencies.kt') }}
- name: Fetch AVD Cache
uses: actions/cache@v2
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-${{ env.androidApiVersion }}
- name: Create AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.androidApiVersion }}
arch: x86_64
force-avd-creation: false
disable-animations: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: echo "Generated AVD snapshot for caching."
- name: 🤖 Run Ui Tests
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ env.androidApiVersion }}
arch: x86_64
force-avd-creation: false
disable-animations: true
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
script: ./gradlew connectedCheck
- name: Upload test reports
if: always()
uses: actions/upload-artifact@v2
with:
name: test-reports
path: app/build/reports