diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb64eb2d9..bc80e6e3d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -266,14 +266,24 @@ jobs: cd src/test/android/testapp ../../../../gradlew assembledebug ../../../../gradlew assembleAndroidTest - - name: Device Farm Tests + - name: Device Farm Tests Highly Available run: | echo "Running Device Farm Python Script" python3 ./.github/workflows/run_android_ci.py \ --run_id ${{ github.run_id }} \ --run_attempt ${{ github.run_attempt }} \ --project_arn $(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/DeviceFarm/ProjectArn" --query "SecretString" | cut -f5 -d\" | cut -f1 -d'\') \ - --device_pool_arn $(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/DeviceFarm/DevicePoolArn" --query "SecretString" | cut -f5 -d\" | cut -f1 -d'\') + --device_pool_arn $(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/DeviceFarm/DevicePoolArn" --query "SecretString" | cut -f5 -d\" | cut -f1 -d'\') \ + --device_pool highly_available + - name: Device Farm Tests Android 8.0.0 + run: | + echo "Running Device Farm Python Script" + python3 ./.github/workflows/run_android_ci.py \ + --run_id ${{ github.run_id }} \ + --run_attempt ${{ github.run_attempt }} \ + --project_arn $(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/DeviceFarm/ProjectArn" --query "SecretString" | cut -f5 -d\" | cut -f1 -d'\') \ + --device_pool_arn $(aws secretsmanager get-secret-value --region us-east-1 --secret-id "ci/DeviceFarm/DevicePoolArnAndroid8" --query "SecretString" | cut -f5 -d\" | cut -f1 -d'\') \ + --device_pool android_8 # check that docs can still build check-docs: diff --git a/.github/workflows/run_android_ci.py b/.github/workflows/run_android_ci.py index 17ddf1596..5ff321696 100755 --- a/.github/workflows/run_android_ci.py +++ b/.github/workflows/run_android_ci.py @@ -12,6 +12,7 @@ parser.add_argument('--run_attempt', required=True, help="A unique number for each attempt of a particular workflow run in a repository") parser.add_argument('--project_arn', required=True, help="Arn for the Device Farm Project the apk will be tested on") parser.add_argument('--device_pool_arn', required=True, help="Arn for device pool of the Device Farm Project the apk will be tested on") +parser.add_argument('--device_pool', required=True, help="Which device pool is being used for this test") current_working_directory = os.getcwd() build_file_location = current_working_directory + '/src/test/android/testapp/build/outputs/apk/debug/testapp-debug.apk' @@ -24,6 +25,7 @@ def main(): run_attempt = args.run_attempt project_arn = args.project_arn device_pool_arn = args.device_pool_arn + device_pool = args.device_pool region = os.getenv('AWS_DEVICE_FARM_REGION') @@ -38,7 +40,7 @@ def main(): print("Boto3 client established") # Upload the crt library shell app to Device Farm - upload_file_name = 'CI-' + run_id + '-' + run_attempt + '.apk' + upload_file_name = 'CI-' + run_id + '-' + run_attempt + '-' + device_pool + '.apk' print('Upload file name: ' + upload_file_name) # Prepare upload to Device Farm project @@ -64,7 +66,7 @@ def main(): device_farm_upload_status = client.get_upload(arn=device_farm_upload_arn) # Upload the instrumentation test package to Device Farm - upload_test_file_name = 'CI-' + run_id + '-' + run_attempt + 'tests.apk' + upload_test_file_name = 'CI-' + run_id + '-' + run_attempt + '-' + device_pool + 'tests.apk' print('Upload file name: ' + upload_test_file_name) # Prepare upload to Device Farm project @@ -90,7 +92,7 @@ def main(): device_farm_upload_status = client.get_upload(arn=device_farm_instrumentation_upload_arn) # Upload the test spec file to Device Farm - upload_spec_file_name = 'CI-' + run_id + '-' + run_attempt + 'test-spec.yml' + upload_spec_file_name = 'CI-' + run_id + '-' + run_attempt + '-' + device_pool + 'test-spec.yml' print('Upload file name: ' + upload_spec_file_name) # Prepare upload to Device Farm project