-
Notifications
You must be signed in to change notification settings - Fork 1.1k
72 lines (65 loc) · 2.36 KB
/
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
name: test
on:
workflow_dispatch:
pull_request:
push:
paths-ignore:
- 'web/**'
jobs:
test:
runs-on: macos-latest
strategy:
max-parallel: 2
matrix:
android:
- { version: '16', arch: "x86" }
- { version: '19', arch: "x86" }
- { version: '21', arch: "x86_64" }
- { version: '26', arch: "x86_64" }
- { version: '33', arch: "x86_64" }
steps:
- name: Setup Java
uses: actions/setup-java@v3.12.0
with:
distribution: 'temurin'
java-version: '17'
- name: Checkout ACRA
uses: actions/checkout@v3
- name: Gradle cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: gradle-${{ runner.os }}-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}-${{ hashFiles('**/buildSrc/**/*.kt') }}
- name: load AVD from cache for API ${{ matrix.android.version }}
uses: actions/cache@v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: emulator-${{ matrix.android.version }}-${{ matrix.android.arch }}
- name: create and cache AVD for API ${{ matrix.android.version }}
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@v2
with:
api-level: ${{ matrix.android.version }}
arch: ${{ matrix.android.arch }}
target: 'google_apis'
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: run tests on API ${{ matrix.android.version }}
uses: Wandalen/wretry.action@v1.3.0
with:
action: reactivecircus/android-emulator-runner@v2
with: |
api-level: ${{ matrix.android.version }}
arch: ${{ matrix.android.arch }}
target: google_apis
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: ./gradlew connectedCheck --no-daemon