-
Notifications
You must be signed in to change notification settings - Fork 4
80 lines (71 loc) · 2.37 KB
/
main.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
75
76
77
78
79
name: EasyPref CI
on:
push:
branches:
- main
paths-ignore:
- '**.md'
jobs:
test:
runs-on: macos-latest
env:
JAVA_TOOL_OPTIONS: -Xmx4g
timeout-minutes: 15
strategy:
matrix:
api-level: [19,26,29]
target: [default]
arch: [x86]
steps:
- name: Checkout
uses: actions/[email protected]
- name: Gradle Wrapper Validation
uses: gradle/wrapper-validation-action@v1
- name: Setup Java JDK
uses: actions/[email protected]
with:
distribution: 'zulu'
java-version: 17
- name: Cache
uses: actions/[email protected]
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
~/.android/debug.keystore
key: avd-${{ matrix.api-level }}-macos-latest-${{ matrix.target }}
- name: Assemble Tests
uses: gradle/[email protected]
with:
arguments: assembleAndroidTest
- name: Run Emulator to Generate Snapshot for Caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: ReactiveCircus/[email protected]
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
profile: Galaxy Nexus
avd-name: test
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 TestCase Action
uses: ReactiveCircus/[email protected]
with:
api-level: ${{ matrix.api-level }}
target: ${{ matrix.target }}
arch: ${{ matrix.arch }}
profile: Galaxy Nexus
avd-name: test
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
pre-emulator-launch-script: |
echo "Running pre-emulator launch script."
script: |
echo $GITHUB_REPOSITORY
adb devices
./gradlew app:connectedAndroidTest -Pandroid.testInstrumentationRunnerArguments.class=com.sample.easyprefs.kotlin.TestSuite -i