-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
69 lines (67 loc) · 2.86 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
67
68
69
container:
image: cirrusci/android-sdk:30
cpu: 4
memory: 16G
kvm: true
env:
CC_TEST_REPORTER_ID: ENCRYPTED[f7470379a00524284d0c9db2b345619d692200b0550672d7cfb56f7aa4452288aff1b4dbcdbe6419e82ad25e03a2a465]
SECRETCONTENT: ENCRYPTED[1c69d17ee10c54682c57ff3cf3a84cbb159c01b9e7e82dd5aee978f68acd56f605601d0fabab43c26c1715b263e55d3b]
FIREBASE_TOKEN: ENCRYPTED[1b68792433508b1e5b8f2bb4f7a7ae2cfdf750b6c2d2fd3239b960d16344cbe11c339b5a6a6806d1a0309445c5ae5465]
check_android_task:
name: Run Android tests
download_firebase_emulator_script: |
curl -Lo ./firebase_bin https://firebase.tools/bin/linux/latest
install_firebase_emulator_script: curl -sL https://firebase.tools | bash
install_emulator_script: sdkmanager --install "system-images;android-30;google_apis_playstore;x86"
create_avd_script: echo no | avdmanager create avd --force
--name emulator
--package "system-images;android-30;google_apis_playstore;x86"
start_avd_background_script: $ANDROID_HOME/emulator/emulator
-avd emulator
-no-audio
-no-boot-anim
-gpu swiftshader_indirect
-no-snapshot
-no-window
-camera-back none
-skin 1080x1920
-dpi-device 420
imports_secrets_script: |
touch ./secret.local
echo "$SECRETCONTENT" | base64 -d > ./secret.local
assemble_instrumented_tests_script: |
chmod +x gradlew
./gradlew assembleDebugAndroidTest
wait_for_avd_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
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
screen_record_background_script: for n in $(seq 1 20); do adb exec-out screenrecord --time-limit=180 --output-format=h264 - > $n.h264; done
check_script: |
chmod +x firebase_bin
./firebase_bin emulators:exec --project mediato-21040 './gradlew check connectedCheck'
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:
wait_for_screenrecord_script: |
pkill -2 -x adb
sleep 2
screenrecord_artifacts:
path: "*.h264"
android_lint_artifacts:
path: ./app/build/reports/lint-results-debug.xml
format: android-lint
test_artifacts:
path: "./app/build/test-results/**/*.xml"
format: junit
androidtest_artifacts:
path: "./app/build/outputs/**/*.xml"
format: junit