@@ -988,9 +988,10 @@ jobs:
988988 timeout_minutes : 5
989989 max_attempts : 3
990990 command : scripts/gha/install_test_workflow_prereqs.sh -p Android -t true
991- - id : get- device-type
991+ - id : device-info
992992 run : |
993- echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -d -k ${{ matrix.android_device }} )"
993+ echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -k ${{ matrix.android_device }} -get_device_type)"
994+ echo "::set-output name=device::$( python scripts/gha/print_matrix_configuration.py -k ${{ matrix.android_device }} -get_ftl_device)"
994995 - name : Set up Node (16)
995996 uses : actions/setup-node@v2
996997 with :
@@ -1001,15 +1002,15 @@ jobs:
10011002 distribution : ' temurin'
10021003 java-version : ' 17'
10031004 - name : Setup Firestore Emulator
1004- if : steps.get- device-type .outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
1005+ if : steps.device-info .outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
10051006 uses : nick-invision/retry@v2
10061007 with :
10071008 shell : bash
10081009 timeout_minutes : 5
10091010 max_attempts : 3
10101011 command : npm install -g firebase-tools
10111012 - name : Start Firestore Emulator
1012- if : steps.get- device-type .outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
1013+ if : steps.device-info .outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
10131014 run : |
10141015 firebase emulators:start --only firestore --project demo-example &
10151016 - name : Setup java 8 for test_simulator.py
@@ -1018,27 +1019,31 @@ jobs:
10181019 distribution : ' temurin'
10191020 java-version : ' 8'
10201021 - name : Run Android integration tests on Emulator locally
1021- timeout-minutes : 120
1022- if : steps.get- device-type .outputs.device_type == 'virtual'
1022+ timeout-minutes : 150
1023+ if : steps.device-info .outputs.device_type == 'virtual'
10231024 run : |
10241025 python scripts/gha/test_simulator.py --testapp_dir testapps \
10251026 --test_type "${{ matrix.test_type }}" \
10261027 --android_device "${{ matrix.android_device }}" \
10271028 --logfile_name "android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}" \
10281029 --ci
1029- - name : Install Cloud SDK
1030- if : steps.get-device-type.outputs.device_type == 'real'
1031- uses : google-github-actions/setup-gcloud@v0
1032- - name : Run Android integration tests on Real Device via FTL
1033- timeout-minutes : 60
1034- if : steps.get-device-type.outputs.device_type == 'real'
1030+ - id : ftl_test
1031+ if : steps.device-info.outputs.device_type == 'real'
1032+ uses : FirebaseExtended/github-actions/firebase-test-lab@v1.1
1033+ timeout-minutes : 90
1034+ with :
1035+ credentials_json : ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
1036+ testapp_dir : testapps
1037+ test_type : " game-loop"
1038+ test_devices : ${{ steps.device-info.outputs.device }}
1039+ max_attempts : 3
1040+ validator : ${GITHUB_WORKSPACE}/scripts/gha/integration_testing/ftl_gha_validator.py
1041+ - name : Read FTL Test Result
1042+ if : steps.device-info.outputs.device_type == 'real'
1043+ shell : bash
10351044 run : |
1036- python scripts/gha/test_lab.py --testapp_dir testapps \
1037- --android_device "${{ matrix.android_device }}" \
1038- --logfile_name "android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}" \
1039- --code_platform cpp \
1040- --key_file_encrypted scripts/gha-encrypted/gcs_key_file.json.gpg \
1041- --key_file_passphrase "${{ secrets.TEST_SECRET }}"
1045+ python scripts/gha/read_ftl_test_result.py --test_result '${{ steps.ftl_test.outputs.test_summary }}' \
1046+ --output_path testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}.log
10421047 - name : Prepare results summary artifact
10431048 if : ${{ !cancelled() }}
10441049 shell : bash
@@ -1055,14 +1060,14 @@ jobs:
10551060 path : testapps/test-results-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}*
10561061 retention-days : ${{ env.artifactRetentionDays }}
10571062 - name : Upload Android test video artifact
1058- if : ${{ steps.get- device-type .outputs.device_type == 'virtual' && !cancelled() }}
1063+ if : ${{ steps.device-info .outputs.device_type == 'virtual' && !cancelled() }}
10591064 uses : actions/upload-artifact@v3
10601065 with :
10611066 name : mobile-simulator-test-video-artifact
10621067 path : testapps/video-*-android-${{ matrix.build_os }}-${{ matrix.android_device }}-${{ matrix.test_type }}.mp4
10631068 retention-days : ${{ env.artifactRetentionDays }}
10641069 - name : Upload Android test logcat artifact
1065- if : ${{ steps.get- device-type .outputs.device_type == 'virtual' && !cancelled() }}
1070+ if : ${{ steps.device-info .outputs.device_type == 'virtual' && !cancelled() }}
10661071 uses : actions/upload-artifact@v3
10671072 with :
10681073 name : mobile-simulator-test-logcat-artifact
@@ -1130,9 +1135,10 @@ jobs:
11301135 timeout_minutes : 3
11311136 max_attempts : 3
11321137 command : scripts/gha/install_test_workflow_prereqs.sh -p iOS -t true
1133- - id : get- device-type
1138+ - id : device-info
11341139 run : |
1135- echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -d -k ${{ matrix.ios_device }} )"
1140+ echo "::set-output name=device_type::$( python scripts/gha/print_matrix_configuration.py -k ${{ matrix.ios_device }} -get_device_type)"
1141+ echo "::set-output name=device::$( python scripts/gha/print_matrix_configuration.py -k ${{ matrix.ios_device }} -get_ftl_device)"
11361142 - name : Set up Node (16)
11371143 uses : actions/setup-node@v2
11381144 with :
@@ -1143,40 +1149,43 @@ jobs:
11431149 distribution : ' temurin'
11441150 java-version : ' 17'
11451151 - name : Setup Firestore Emulator
1146- if : steps.get- device-type .outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
1152+ if : steps.device-info .outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
11471153 uses : nick-invision/retry@v2
11481154 with :
11491155 shell : bash
11501156 timeout_minutes : 5
11511157 max_attempts : 3
11521158 command : npm install -g firebase-tools
11531159 - name : Start Firestore Emulator
1154- if : steps.get- device-type .outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
1160+ if : steps.device-info .outputs.device_type == 'virtual' && contains(needs.check_and_prepare.outputs.apis, 'firestore')
11551161 run : |
11561162 firebase emulators:start --only firestore --project demo-example &
11571163 - name : Run iOS integration tests on Simulator locally
1158- timeout-minutes : 120
1159- if : steps.get- device-type .outputs.device_type == 'virtual'
1164+ timeout-minutes : 150
1165+ if : steps.device-info .outputs.device_type == 'virtual'
11601166 run : |
11611167 python scripts/gha/test_simulator.py --testapp_dir testapps \
11621168 --test_type "${{ matrix.test_type }}" \
11631169 --ios_device "${{ matrix.ios_device }}" \
11641170 --logfile_name "ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}" \
11651171 --ci
1166- - name : Install Cloud SDK
1167- if : steps.get-device-type.outputs.device_type == 'real'
1168- uses : google-github-actions/setup-gcloud@v0
1169- - name : Run iOS integration tests on Real Device via FTL
1170- # max 3 retry and 10m timeout for each testapp, plus other steps
1171- timeout-minutes : 60
1172- if : steps.get-device-type.outputs.device_type == 'real'
1172+ - id : ftl_test
1173+ if : steps.device-info.outputs.device_type == 'real'
1174+ uses : FirebaseExtended/github-actions/firebase-test-lab@v1.1
1175+ timeout-minutes : 90
1176+ with :
1177+ credentials_json : ${{ secrets.FIREBASE_SERVICE_ACCOUNT_CREDENTIALS }}
1178+ testapp_dir : testapps
1179+ test_type : " game-loop"
1180+ test_devices : ${{ steps.device-info.outputs.device }}
1181+ max_attempts : 3
1182+ validator : ${GITHUB_WORKSPACE}/scripts/gha/integration_testing/ftl_gha_validator.py
1183+ - name : Read FTL Test Result
1184+ if : steps.device-info.outputs.device_type == 'real'
1185+ shell : bash
11731186 run : |
1174- python scripts/gha/test_lab.py --testapp_dir testapps \
1175- --ios_device "${{ matrix.ios_device }}" \
1176- --logfile_name "ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}" \
1177- --code_platform cpp \
1178- --key_file_encrypted scripts/gha-encrypted/gcs_key_file.json.gpg \
1179- --key_file_passphrase "${{ secrets.TEST_SECRET }}"
1187+ python scripts/gha/read_ftl_test_result.py --test_result '${{ steps.ftl_test.outputs.test_summary }}' \
1188+ --output_path testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}.log
11801189 - name : Prepare results summary artifact
11811190 if : ${{ !cancelled() }}
11821191 shell : bash
@@ -1193,7 +1202,7 @@ jobs:
11931202 path : testapps/test-results-ios-${{ matrix.build_os }}-${{ matrix.ios_device }}-${{ matrix.test_type }}*
11941203 retention-days : ${{ env.artifactRetentionDays }}
11951204 - name : Upload iOS test video artifact
1196- if : ${{ steps.get- device-type .outputs.device_type == 'virtual' && !cancelled() }}
1205+ if : ${{ steps.device-info .outputs.device_type == 'virtual' && !cancelled() }}
11971206 uses : actions/upload-artifact@v3
11981207 with :
11991208 name : mobile-simulator-test-video-artifact
0 commit comments