1616 required : true
1717 apis :
1818 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'
2020 required : true
2121 operating_systems :
2222 description : ' CSV of VMs to run on'
@@ -1092,7 +1092,7 @@ jobs:
10921092
10931093
10941094 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 }}
10961096 needs : [check_and_prepare, build_android]
10971097 runs-on : macos-12
10981098 if : contains(needs.check_and_prepare.outputs.matrix_platform, 'Android') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
@@ -1101,6 +1101,12 @@ jobs:
11011101 matrix :
11021102 build_os : ${{ fromJson(needs.check_and_prepare.outputs.matrix_os) }}
11031103 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"
11041110 steps :
11051111 - name : setup Xcode version (macos)
11061112 if : runner.os == 'macOS'
@@ -1151,8 +1157,9 @@ jobs:
11511157 if : steps.get-device-type.outputs.device_type == 'virtual'
11521158 run : |
11531159 python scripts/gha/test_simulator.py --testapp_dir testapps \
1160+ --test_type "${{ matrix.test_type }}" \
11541161 --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 }} " \
11561163 --ci
11571164 - name : Install Cloud SDK
11581165 if : steps.get-device-type.outputs.device_type == 'real'
@@ -1163,24 +1170,31 @@ jobs:
11631170 run : |
11641171 python scripts/gha/test_lab.py --testapp_dir testapps \
11651172 --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 }} " \
11671174 --code_platform cpp \
11681175 --key_file_encrypted scripts/gha-encrypted/gcs_key_file.json.gpg \
11691176 --key_file_passphrase "${{ secrets.TEST_SECRET }}"
11701177 - name : Prepare results summary artifact
11711178 if : ${{ !cancelled() }}
11721179 shell : bash
11731180 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"
11771184 fi
11781185 - name : Upload Android test results artifact
11791186 if : ${{ !cancelled() }}
11801187 uses : actions/upload-artifact@v3
11811188 with :
11821189 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
11841198 retention-days : ${{ env.artifactRetentionDays }}
11851199 - name : Download log artifacts
11861200 if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -1202,20 +1216,28 @@ jobs:
12021216 if : ${{ !cancelled() }}
12031217 shell : bash
12041218 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"
12061220 if [[ "${{ job.status }}" != "success" ]]; then
12071221 exit 1
12081222 fi
12091223
12101224 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 }}
12121226 needs : [check_and_prepare, build_ios]
12131227 runs-on : macos-12
12141228 if : contains(needs.check_and_prepare.outputs.matrix_platform, 'iOS') && needs.check_and_prepare.outputs.apis != '' && !cancelled()
12151229 strategy :
12161230 fail-fast : false
12171231 matrix :
12181232 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"
12191241 build_os : [macos-12]
12201242 steps :
12211243 - name : setup Xcode version (macos)
@@ -1261,8 +1283,9 @@ jobs:
12611283 if : steps.get-device-type.outputs.device_type == 'virtual'
12621284 run : |
12631285 python scripts/gha/test_simulator.py --testapp_dir testapps \
1286+ --test_type "${{ matrix.test_type }}" \
12641287 --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 }} " \
12661289 --ci
12671290 - name : Install Cloud SDK
12681291 if : steps.get-device-type.outputs.device_type == 'real'
@@ -1274,24 +1297,31 @@ jobs:
12741297 run : |
12751298 python scripts/gha/test_lab.py --testapp_dir testapps \
12761299 --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 }} " \
12781301 --code_platform cpp \
12791302 --key_file_encrypted scripts/gha-encrypted/gcs_key_file.json.gpg \
12801303 --key_file_passphrase "${{ secrets.TEST_SECRET }}"
12811304 - name : Prepare results summary artifact
12821305 if : ${{ !cancelled() }}
12831306 shell : bash
12841307 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"
12881311 fi
12891312 - name : Upload iOS test results artifact
12901313 if : ${{ !cancelled() }}
12911314 uses : actions/upload-artifact@v3
12921315 with :
12931316 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
12951325 retention-days : ${{ env.artifactRetentionDays }}
12961326 - name : Download log artifacts
12971327 if : ${{ needs.check_and_prepare.outputs.pr_number && failure() && !cancelled() }}
@@ -1313,7 +1343,7 @@ jobs:
13131343 if : ${{ !cancelled() }}
13141344 shell : bash
13151345 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"
13171347 if [[ "${{ job.status }}" != "success" ]]; then
13181348 exit 1
13191349 fi
0 commit comments