16
16
required : true
17
17
apis :
18
18
description : ' CSV of apis to build and test'
19
- default : ' admob,analytics,auth,database,dynamic_links,firestore,functions,installations,messaging,remote_config,storage'
19
+ default : ' admob,analytics,auth,database,dynamic_links,firestore,functions,gma, installations,messaging,remote_config,storage'
20
20
required : true
21
21
operating_systems :
22
22
description : ' CSV of VMs to run on'
@@ -1092,7 +1092,7 @@ jobs:
1092
1092
1093
1093
1094
1094
test_android :
1095
- name : test-android-${{ matrix.build_os }}-${{ matrix.android_device }}
1095
+ name : test-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}
1096
1096
needs : [check_and_prepare, build_android]
1097
1097
runs-on : macos-12
1098
1098
if : contains(needs.check_and_prepare.outputs.matrix_platform, 'Android') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
@@ -1101,6 +1101,12 @@ jobs:
1101
1101
matrix :
1102
1102
build_os : ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }}
1103
1103
android_device : ${{ fromJson(needs.check_and_prepare.outputs.android_device) }}
1104
+ test_type : ["gameloop"]
1105
+ exclude :
1106
+ - android_device : " android_target"
1107
+ test_type : " uitest"
1108
+ - android_device : " android_latest"
1109
+ test_type : " uitest"
1104
1110
steps :
1105
1111
- name : setup Xcode version (macos)
1106
1112
if : runner.os == 'macOS'
@@ -1151,8 +1157,9 @@ jobs:
1151
1157
if : steps.get-device-type.outputs.device_type == 'virtual'
1152
1158
run : |
1153
1159
python scripts/gha/test_simulator.py --testapp_dir testapps \
1160
+ --test_type "${{ matrix.test_type }}" \
1154
1161
--android_device "${{ matrix.android_device }}" \
1155
- --logfile_name "android-${{ matrix.build_os }}-${{ matrix.android_device }}" \
1162
+ --logfile_name "android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }} " \
1156
1163
--ci
1157
1164
- name : Install Cloud SDK
1158
1165
if : steps.get-device-type.outputs.device_type == 'real'
@@ -1163,24 +1170,31 @@ jobs:
1163
1170
run : |
1164
1171
python scripts/gha/test_lab.py --testapp_dir testapps \
1165
1172
--android_device "${{ matrix.android_device }}" \
1166
- --logfile_name "android-${{ matrix.build_os }}-${{ matrix.android_device }}" \
1173
+ --logfile_name "android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }} " \
1167
1174
--code_platform cpp \
1168
1175
--key_file_encrypted scripts/gha-encrypted/gcs_key_file.json.gpg \
1169
1176
--key_file_passphrase "${{ secrets.TEST_SECRET }}"
1170
1177
- name : Prepare results summary artifact
1171
1178
if : ${{ !cancelled() }}
1172
1179
shell : bash
1173
1180
run : |
1174
- # If testapps do not exist, then it's a build error not test error.
1175
- if [ -d "testapps/testapps-android-${{ matrix.build_os }}" && ! -f "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}.log.json" ]; then
1176
- mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}.log.json"
1181
+ # If testapps do not exist, then it's a build error not test error.
1182
+ if [ -d "testapps/testapps-android-${{ matrix.build_os }}" && ! -f "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }} .log.json" ]; then
1183
+ mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }} .log.json"
1177
1184
fi
1178
1185
- name : Upload Android test results artifact
1179
1186
if : ${{ !cancelled() }}
1180
1187
uses : actions/upload-artifact@v3
1181
1188
with :
1182
1189
name : log-artifact
1183
- path : testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}*
1190
+ path : testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}*
1191
+ retention-days : ${{ env.artifactRetentionDays }}
1192
+ - name : Upload Android test video artifact
1193
+ if : ${{ steps.get-device-type.outputs.device_type == 'virtual' && !cancelled() }}
1194
+ uses : actions/upload-artifact@v3
1195
+ with :
1196
+ name : mobile-simulator-test-video-artifact
1197
+ path : testapps/video-*-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}.mp4
1184
1198
retention-days : ${{ env.artifactRetentionDays }}
1185
1199
- name : Download log artifacts
1186
1200
if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -1202,20 +1216,28 @@ jobs:
1202
1216
if : ${{ !cancelled() }}
1203
1217
shell : bash
1204
1218
run : |
1205
- cat "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}.log"
1219
+ cat "testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }} .log"
1206
1220
if [[ "${{ job.status }}" != "success" ]]; then
1207
1221
exit 1
1208
1222
fi
1209
1223
1210
1224
test_ios :
1211
- name : test-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}
1225
+ name : test-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}
1212
1226
needs : [check_and_prepare, build_ios]
1213
1227
runs-on : macos-12
1214
1228
if : contains(needs.check_and_prepare.outputs.matrix_platform, 'iOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
1215
1229
strategy :
1216
1230
fail-fast : false
1217
1231
matrix :
1218
1232
ios_device : ${{ fromJson(needs.check_and_prepare.outputs.ios_device) }}
1233
+ test_type : ["gameloop"]
1234
+ exclude :
1235
+ - ios_device : " ios_min"
1236
+ test_type : " uitest"
1237
+ - ios_device : " ios_target"
1238
+ test_type : " uitest"
1239
+ - ios_device : " ios_latest"
1240
+ test_type : " uitest"
1219
1241
build_os : [macos-12]
1220
1242
steps :
1221
1243
- name : setup Xcode version (macos)
@@ -1261,8 +1283,9 @@ jobs:
1261
1283
if : steps.get-device-type.outputs.device_type == 'virtual'
1262
1284
run : |
1263
1285
python scripts/gha/test_simulator.py --testapp_dir testapps \
1286
+ --test_type "${{ matrix.test_type }}" \
1264
1287
--ios_device "${{ matrix.ios_device }}" \
1265
- --logfile_name "ios-${{ matrix.build_os }}-${{ matrix.ios_device }}" \
1288
+ --logfile_name "ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }} " \
1266
1289
--ci
1267
1290
- name : Install Cloud SDK
1268
1291
if : steps.get-device-type.outputs.device_type == 'real'
@@ -1274,24 +1297,31 @@ jobs:
1274
1297
run : |
1275
1298
python scripts/gha/test_lab.py --testapp_dir testapps \
1276
1299
--ios_device "${{ matrix.ios_device }}" \
1277
- --logfile_name "ios-${{ matrix.build_os }}-${{ matrix.ios_device }}" \
1300
+ --logfile_name "ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }} " \
1278
1301
--code_platform cpp \
1279
1302
--key_file_encrypted scripts/gha-encrypted/gcs_key_file.json.gpg \
1280
1303
--key_file_passphrase "${{ secrets.TEST_SECRET }}"
1281
1304
- name : Prepare results summary artifact
1282
1305
if : ${{ !cancelled() }}
1283
1306
shell : bash
1284
1307
run : |
1285
- # If testapps do not exist, then it's a build error not test error.
1286
- if [ -d "testapps/testapps-ios-${{ matrix.build_os }}" && ! -f "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}.log.json" ]; then
1287
- mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}.log.json"
1308
+ # If testapps do not exist, then it's a build error not test error.
1309
+ if [ -d "testapps/testapps-ios-${{ matrix.build_os }}" && ! -f "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }} .log.json" ]; then
1310
+ mkdir -p testapps && echo "__SUMMARY_MISSING__" > "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }} .log.json"
1288
1311
fi
1289
1312
- name : Upload iOS test results artifact
1290
1313
if : ${{ !cancelled() }}
1291
1314
uses : actions/upload-artifact@v3
1292
1315
with :
1293
1316
name : log-artifact
1294
- path : testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}*
1317
+ path : testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}*
1318
+ retention-days : ${{ env.artifactRetentionDays }}
1319
+ - name : Upload iOS test video artifact
1320
+ if : ${{ steps.get-device-type.outputs.device_type == 'virtual' && !cancelled() }}
1321
+ uses : actions/upload-artifact@v3
1322
+ with :
1323
+ name : mobile-simulator-test-video-artifact
1324
+ path : testapps/video-*-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}.mp4
1295
1325
retention-days : ${{ env.artifactRetentionDays }}
1296
1326
- name : Download log artifacts
1297
1327
if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -1313,7 +1343,7 @@ jobs:
1313
1343
if : ${{ !cancelled() }}
1314
1344
shell : bash
1315
1345
run : |
1316
- cat "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}.log"
1346
+ cat "testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }} .log"
1317
1347
if [[ "${{ job.status }}" != "success" ]]; then
1318
1348
exit 1
1319
1349
fi
0 commit comments