forked from KasperskyLab/Kaspresso
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
198 lines (193 loc) · 7.53 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
check_android_30_task:
name: Run Android instrumented tests on API 30
env:
DISPLAY: :99
only_if: $CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'
skip: "changesIncludeOnly('NOTICE.txt', 'LICENSE.txt', '**.{md,html}')"
container:
image: cirrusci/android-sdk:33
kvm: true
cpu: 8
memory: 24G
start_adb_server_background_script:
java -jar artifacts/adbserver-desktop.jar || true
accept_licenses_script:
echo yes | sdkmanager --licenses
install_emulator_script:
# x86_64 somehow affect the "call" test
sdkmanager --install "system-images;android-30;google_apis;x86"
create_avd_script: |
echo no | avdmanager create avd --force -n emulator -k "system-images;android-30;google_apis;x86"
echo skin.name=768x1280 >> ~/.android/avd/emulator.avd/config.ini
echo skin.path=_no_skin >> ~/.android/avd/emulator.avd/config.ini
echo hw.lcd.density=320 >> ~/.android/avd/emulator.avd/config.ini
echo hw.lcd.height=1280 >> ~/.android/avd/emulator.avd/config.ini
echo hw.lcd.width=768 >> ~/.android/avd/emulator.avd/config.ini
start_avd_background_script:
$ANDROID_HOME/emulator/emulator
-avd emulator
-no-audio
-no-boot-anim
-gpu swiftshader_indirect
-no-snapshot
-no-window
assemble_instrumented_tests_script:
./gradlew -PCI=true assembleDebugAndroidTest
wait_for_avd_script:
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 3; done; input keyevent 82'
configure_avd_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
adb shell settings put secure spell_checker_enabled 0
adb shell settings put secure show_ime_with_hard_keyboard 1
start_logcat_background_script:
adb logcat > log.log
run_tests_script:
./gradlew -PCI=true connectedDebugAndroidTest
always:
stop_logcat_script: |
if [[ $(adb devices | awk 'NR>1 {print $1}') =~ "emulator.*" ]]; then
adb logcat -c
fi
pull_artifacts_script:
adb exec-out sh -c "cd /sdcard && tar cf - Documents" > artifacts.tar
logs_artifacts:
path: log.log
artifacts_artifacts:
path: "artifacts.tar"
sample_report_artifacts:
path: "samples/kaspresso-sample/build/reports/androidTests/connected/**/*"
kautomator_sample_report_artifacts:
path: "samples/kautomator-sample/build/reports/androidTests/connected/**/*"
tutorial_report_artifacts:
path: "tutorial/build/reports/androidTests/connected/**/*"
allure_report_artifacts:
path: "samples/kaspresso-allure-support-sample/build/reports/androidTests/connected/**/*"
check_android_33_task:
name: Run Android instrumented tests on API 33
env:
DISPLAY: :99
only_if: $CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'
skip: "changesIncludeOnly('NOTICE.txt', 'LICENSE.txt', '**.{md,html}')"
container:
image: cirrusci/android-sdk:33
kvm: true
cpu: 8
memory: 24G
start_adb_server_background_script:
java -jar artifacts/adbserver-desktop.jar || true
accept_licenses_script:
echo yes | sdkmanager --licenses
install_emulator_script:
sdkmanager --install "system-images;android-33;google_apis;x86_64"
create_avd_script: |
echo no | avdmanager create avd --force -n emulator -k "system-images;android-33;google_apis;x86_64"
echo 'hw.ramSize=2048MB' >> ~/.android/avd/emulator.avd/config.ini
start_avd_background_script:
$ANDROID_HOME/emulator/emulator
-avd emulator
-no-audio
-no-boot-anim
-gpu swiftshader_indirect
-no-snapshot
-no-window
assemble_instrumented_tests_script:
./gradlew -PCI=true assembleDebugAndroidTest
wait_for_avd_script:
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 3; done; input keyevent 82'
configure_avd_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
adb shell settings put secure spell_checker_enabled 0
adb shell settings put secure show_ime_with_hard_keyboard 1
adb shell cmd overlay enable com.android.internal.systemui.navbar.threebutton
start_logcat_background_script:
adb logcat > log.log
run_tests_script:
./gradlew -PCI=true connectedDebugAndroidTest
always:
stop_logcat_script: |
if [[ $(adb devices | awk 'NR>1 {print $1}') =~ "emulator.*" ]]; then
adb logcat -c
fi
pull_artifacts_script:
adb exec-out sh -c "cd /sdcard && tar cf - Documents" > artifacts.tar
logs_artifacts:
path: log.log
artifacts_artifacts:
path: "artifacts.tar"
sample_report_artifacts:
path: "samples/kaspresso-sample/build/reports/androidTests/connected/**/*"
kautomator_sample_report_artifacts:
path: "samples/kautomator-sample/build/reports/androidTests/connected/**/*"
tutorial_report_artifacts:
path: "tutorial/build/reports/androidTests/connected/**/*"
allure_report_artifacts:
path: "samples/kaspresso-allure-support-sample/build/reports/androidTests/connected/**/*"
check_android_21_task:
name: Run Android instrumented tests on API 21
env:
DISPLAY: :99
only_if: $CIRRUS_PR != '' && $CIRRUS_BASE_BRANCH == 'master'
skip: "changesIncludeOnly('NOTICE.txt', 'LICENSE.txt', '**.{md,html}')"
container:
image: cirrusci/android-sdk:33
kvm: true
cpu: 8
memory: 24G
start_adb_server_background_script:
java -jar artifacts/adbserver-desktop.jar || true
accept_licenses_script:
echo yes | sdkmanager --licenses
install_emulator_script: |
# x86_64 somehow affect the "call" test
sdkmanager emulator
sdkmanager --install "system-images;android-21;default;x86"
create_avd_script:
echo no | avdmanager create avd --force
-c 1024M
-n emulator
-k "system-images;android-21;default;x86"
start_avd_background_script:
$ANDROID_HOME/emulator/emulator
-avd emulator
-no-audio
-no-boot-anim
-gpu swiftshader_indirect
-no-snapshot
-no-window
assemble_instrumented_tests_script:
./gradlew -PCI=true assembleDebugAndroidTest
wait_for_avd_script:
adb wait-for-device shell 'while [[ -z $(getprop sys.boot_completed) ]]; do sleep 3; done; input keyevent 82'
configure_avd_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
adb shell settings put secure spell_checker_enabled 0
adb shell settings put secure show_ime_with_hard_keyboard 1
start_logcat_background_script:
adb logcat > log.log
run_tests_script:
./gradlew -PCI=true connectedDebugAndroidTest
always:
stop_logcat_script: |
if [[ $(adb devices | awk 'NR>1 {print $1}') =~ "emulator.*" ]]; then
adb logcat -c
fi
pull_artifacts_script:
adb exec-out sh -c "cd /sdcard && tar cf - Documents" > artifacts.tar
logs_artifacts:
path: log.log
artifacts_artifacts:
path: "artifacts.tar"
sample_report_artifacts:
path: "samples/kaspresso-sample/build/reports/androidTests/connected/**/*"
kautomator_sample_report_artifacts:
path: "samples/kautomator-sample/build/reports/androidTests/connected/**/*"
tutorial_report_artifacts:
path: "tutorial/build/reports/androidTests/connected/**/*"
allure_report_artifacts:
path: "samples/kaspresso-allure-support-sample/build/reports/androidTests/connected/**/*"