Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix instrumentation tests, attempt 2 #3014

Merged
merged 1 commit into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/android-device-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ jobs:
aws-region: us-west-2
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ github.run_id }}
role-duration-seconds: 14400

- name: Run ${{ matrix.test.name }} on AWS Device Farm
run: |
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/ios-device-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ jobs:
with:
files: "${{ matrix.test.xcTestFile }}, ${{ matrix.test.ipaFile }}"

- name: Configure AWS Credentials
if: env.run_device_test == 'true'
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-west-2
role-to-assume: ${{ vars.OIDC_AWS_ROLE_TO_ASSUME }}
role-session-name: ${{ github.run_id }}
role-duration-seconds: 14400

- name: Run ${{ matrix.test.name }} on AWS Device Farm
if: steps.check_files.outputs.files_exists == 'true'
run: |
Expand Down
10 changes: 5 additions & 5 deletions scripts/aws-device-farm/aws-device-farm-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ while ((max_checks--)); do
status_test_package="$status_test_package"

if [[ "$status_app" == "SUCCEEDED" && "$status_test_package" == "SUCCEEDED" ]]; then
echo "Uploads succeeded" >&2
echo "Uploads succeeded" >&2
break
elif ((max_checks == 0)); then
echo "App or test package failed to upload" >&2
echo "App or test package failed to upload" >&2
exit 1
fi

Expand Down Expand Up @@ -100,9 +100,9 @@ while true; do
sleep 30
result="$(aws devicefarm get-run --arn "$arn" --output text --query "run.result")"
case $result in
FAILED|ERRORED|STOPPED) echo "Run $result" && exit 1 ;;
SKIPPED|PASSED) echo "Run $result" && exit 0 ;;
FAILED|ERRORED|STOPPED) echo "Run $result" >&2 && exit 1 ;;
SKIPPED|PASSED) echo "Run $result" >&2 && exit 0 ;;
PENDING) continue ;;
*) echo "Unexpected run result $result" && exit 1 ;;
*) echo "Unexpected run result $result" >&2 && exit 1 ;;
esac
done
Loading