-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.cirrus.yml
66 lines (64 loc) · 2.6 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
env:
CC_TEST_REPORTER_ID: ENCRYPTED[d691e43c7b6b4e3f07b5763b31ef435530b3d0bdb6e19f2035661955ba7b85c7a8b8a6527801cce1346fcd84e11fb436]
MAPS_API_KEY: ENCRYPTED[c6f0602a257026d81282f12942805107edbf80459f576f8919bd0090232770743df99a26fb0c08bf2024f39257f2fee4]
container:
image: cirrusci/android-sdk:30
cpu: 4
memory: 16G
kvm: "true"
check_android_task:
name: Run Android tests
alias: check_android
timeout_in: 30m
install_ffmpeg_script: |
sudo apt-get update
sudo apt-get install -y ffmpeg
install_firebase_emulator_script: |
sudo curl -sL https://firebase.tools | bash
install_emulator_script:
sdkmanager --install "system-images;android-30;google_apis_playstore;x86_64"
create_avd_script: echo no | avdmanager create avd --force
--name emulator
--package "system-images;android-30;google_apis_playstore;x86_64"
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
start_firebase_background_script: |
firebase emulators:start --import=emulator/bundled
extract_api_script: |
touch ./local.properties
echo MAPS_API_KEY=$MAPS_API_KEY >> ./local.properties
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:
./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
always:
wait_for_screenrecord_script: |
pkill -2 -x adb
sleep 2
convert_to_mp4_script:
find *.h264 | sed 's:\ :\\\ :g'| sed 's/^/file /' > fl.txt; ffmpeg -f concat -i fl.txt -c copy recording.mp4; rm fl.txt
screenrecord_artifacts:
path: "recording.mp4"