Skip to content

Commit 6273469

Browse files
committed
add ios test section back lol
1 parent b5b888e commit 6273469

1 file changed

Lines changed: 73 additions & 0 deletions

File tree

.github/workflows/harness-aws-device.yml

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -402,3 +402,76 @@ jobs:
402402

403403
- name: Verify iOS app artifact
404404
run: test -f ${{ env.HARNESS_IOS_APP_BUILD_OUTPUT }}
405+
406+
- name: Upload iOS app artifact
407+
uses: actions/upload-artifact@v4
408+
with:
409+
name: ${{ env.HARNESS_IOS_IPA_ARTIFACT_NAME }}
410+
path: ${{ env.HARNESS_IOS_APP_BUILD_OUTPUT }}
411+
if-no-files-found: error
412+
retention-days: 7
413+
414+
test-ios:
415+
name: Test iOS
416+
runs-on: ubuntu-latest
417+
timeout-minutes: 45
418+
needs:
419+
- detect-changes
420+
- prepare-devicefarm-assets
421+
- build-ios
422+
if: ${{ needs.detect-changes.outputs.run_ios == 'true' }}
423+
steps:
424+
- uses: actions/checkout@v6
425+
with:
426+
fetch-depth: 1
427+
428+
- name: Download iOS app artifact
429+
uses: actions/download-artifact@v4
430+
with:
431+
name: ${{ env.HARNESS_IOS_IPA_ARTIFACT_NAME }}
432+
path: ${{ env.HARNESS_PROJECT_ROOT }}/ios/build/devicefarm
433+
434+
- name: Verify iOS app artifact
435+
run: test -f ${{ env.HARNESS_IOS_APP_BUILD_OUTPUT }}
436+
437+
- name: Configure AWS credentials
438+
uses: aws-actions/configure-aws-credentials@v6
439+
with:
440+
role-to-assume: arn:aws:iam::633665345122:role/GitHubDeviceFarmRole
441+
aws-region: ${{ env.HARNESS_AWS_REGION }}
442+
443+
- name: Upload IPA to AWS Device Farm
444+
id: upload-ipa
445+
uses: ./.github/actions/upload-devicefarm-artifact
446+
with:
447+
project-arn: ${{ env.HARNESS_DEVICE_FARM_PROJECT_ARN }}
448+
aws-region: ${{ env.HARNESS_AWS_REGION }}
449+
file-path: ${{ env.HARNESS_IOS_APP_BUILD_OUTPUT }}
450+
upload-type: IOS_APP
451+
content-type: application/octet-stream
452+
upload-name: simple-camera-${{ github.run_id }}-${{ github.run_attempt }}.ipa
453+
454+
- name: Schedule Device Farm iOS Automated Test
455+
id: run-test
456+
uses: aws-actions/aws-devicefarm-mobile-device-testing@v2.3
457+
with:
458+
run-settings-json: |
459+
{
460+
"name": "GitHubAction-${{ github.workflow }}-ios_${{ github.run_id }}_${{ github.run_attempt }}",
461+
"projectArn": "${{ env.HARNESS_DEVICE_FARM_PROJECT_ARN }}",
462+
"appArn": "${{ steps.upload-ipa.outputs['upload-arn'] }}",
463+
"devicePoolArn": "${{ env.HARNESS_DEVICE_FARM_IOS_DEVICE_POOL_ARN }}",
464+
"test": {
465+
"type": "APPIUM_NODE",
466+
"testPackageArn": "${{ needs.prepare-devicefarm-assets.outputs.test_package_arn }}",
467+
"testSpecArn": "${{ needs.prepare-devicefarm-assets.outputs.ios_test_spec_arn }}"
468+
}
469+
}
470+
artifact-types: ALL
471+
472+
- name: Collect iOS Device Farm results
473+
if: always()
474+
uses: ./.github/actions/collect-devicefarm-results
475+
with:
476+
artifact-folder: ${{ steps.run-test.outputs.artifact-folder }}
477+
platform: ios

0 commit comments

Comments
 (0)