forked from ReactiveCircus/FlowBinding
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
30 lines (30 loc) · 1.44 KB
/
.cirrus.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
connected_check_task:
name: Run Android instrumented tests (API $API_LEVEL)
timeout_in: 30m
only_if: $CIRRUS_BRANCH == "main" || CIRRUS_PR != ""
skip: "!changesInclude('.cirrus.yml', '*.gradle', '*.gradle.kts', '**/*.gradle', '**/*.gradle.kts', '*.properties', '**/*.properties', '**/*.kt', '**/*.xml')"
env:
matrix:
- API_LEVEL: 23
- API_LEVEL: 28
JAVA_TOOL_OPTIONS: -Xmx6g
GRADLE_OPTS: -Dorg.gradle.daemon=false -Dkotlin.incremental=false
container:
image: reactivecircus/android-emulator-${API_LEVEL}:latest
kvm: true
cpu: 4
memory: 24G
create_device_script:
echo no | avdmanager create avd --force --name "api-${API_LEVEL}" --abi "${TARGET}/${ARCH}" --package "system-images;android-${API_LEVEL};${TARGET};${ARCH}"
start_emulator_background_script:
$ANDROID_HOME/emulator/emulator -avd "api-${API_LEVEL}" -no-window -gpu swiftshader_indirect -no-snapshot -noaudio -no-boot-anim -camera-back none
assemble_instrumented_tests_script:
./gradlew assembleDebugAndroidTest
wait_for_emulator_script:
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 3; done; input keyevent 82'
disable_animations_script: |
adb shell settings put global window_animation_scale 0.0
adb shell settings put global transition_animation_scale 0.0
adb shell settings put global animator_duration_scale 0.0
run_instrumented_tests_script:
./gradlew connectedDebugAndroidTest