-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
66 lines (66 loc) · 2.7 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
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
check_android_task:
name: Run Android tests
env:
API_LEVEL: 29
TARGET: google_apis
ARCH: x86
CC_TEST_REPORTER_ID: ENCRYPTED[6770a26c58a75c6cd70782dcb463e28fca45e9c25eb04028e3bb17ba2740442e2b5d3c50602172f9f39a2456c4b8af3a]
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }}
MAPS_API_KEY: ENCRYPTED[df7ed70a48a8d0c79c72494f7b16709f3948ae29f07ed6a2776b0f6dcce50a46abb0b640fa39586859c10ccd1c5449b9]
container:
image: reactivecircus/android-emulator-$API_LEVEL:latest
kvm: true
cpu: 8
memory: 10G
download_device_script: |
sdkmanager "system-images;android-$API_LEVEL;$TARGET;$ARCH"
sdkmanager --list
create_device_script:
echo no | avdmanager create avd --force --name test --abi "$TARGET/$ARCH" --package "system-images;android-$API_LEVEL;$TARGET;$ARCH" --device "pixel_3"
install_sudo_script: |
apt-get update
apt-get install sudo -y
apt-get install --assume-yes android-tools-adb android-tools-fastboot
start_emulator_background_script: |
sudo adb kill-server
sudo adb start-server
sudo $ANDROID_SDK_ROOT/emulator/emulator -avd test -no-window -gpu swiftshader_indirect -no-snapshot -no-audio -no-boot-anim -camera-back none
download_fireabse_script : |
curl -sL https://firebase.tools | bash
start_firebase_background_script: |
firebase emulators:start
clear_cache_gradle_script: rm -rf ~/.gradle/caches/*
build_script: |
chmod +x gradlew
./gradlew assembleDebugAndroidTest
wait_for_emulator_script: |
adb wait-for-device
adb shell 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
prepare_codeclimate_script: |
curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
chmod +x ./cc-test-reporter
./cc-test-reporter before-build
logcat_background_script: adb -e logcat *:E
wait_and_reconnect_script: |
avdmanager list avd
adb reconnect offline
adb wait-for-device
adb shell input keyevent 82
avdmanager list avd
check_script: |
./gradlew check connectedCheck --stacktrace
report_codeclimate_script: |
export JACOCO_SOURCE_PATH=app/src/main/java/
./cc-test-reporter format-coverage ./app/build/reports/jacoco/jacocoTestReport/jacocoTestReport.xml --input-type jacoco
./cc-test-reporter upload-coverage
lint_script:
./gradlew lintDebug
always:
android-lint_artifacts:
path: ./app/build/reports/lint-results-debug.xml
type: text/xml
format: android-lint