1
+ name : Integration Tests | Auth - WebAuthn
2
+ on :
3
+ workflow_dispatch :
4
+ workflow_call :
5
+
6
+ permissions :
7
+ id-token : write
8
+ contents : read
9
+
10
+ jobs :
11
+ auth-webauthn-integration-tests :
12
+ name : iOS Tests | AuthWebAuthnApp
13
+ runs-on : macos-15
14
+ timeout-minutes : 30
15
+ environment : IntegrationTest
16
+
17
+ steps :
18
+ - name : Checkout repository
19
+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
20
+ with :
21
+ persist-credentials : false
22
+
23
+ - name : Get build parameters for iOS
24
+ id : platform
25
+ uses : ./.github/composite_actions/get_platform_parameters
26
+ with :
27
+ platform : iOS
28
+
29
+ - name : Create the test configuration directory
30
+ run : mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
31
+
32
+ - name : Download the Integration Test configurations
33
+ uses : ./.github/composite_actions/download_test_configuration
34
+ with :
35
+ resource_subfolder : auth
36
+ aws_role_to_assume : ${{ secrets.AWS_ROLE_TO_ASSUME }}
37
+ aws_region : ${{ secrets.AWS_REGION }}
38
+ aws_s3_bucket : ${{ secrets.AWS_S3_BUCKET_INTEG_V2 }}
39
+ destination : ~/.aws-amplify/amplify-ios/testconfiguration/
40
+
41
+ - name : Set up node
42
+ uses : actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
43
+ with :
44
+ node-version : 16.x
45
+
46
+ - name : Attempt to use the dependencies cache
47
+ id : dependencies-cache
48
+ timeout-minutes : 4
49
+ continue-on-error : true
50
+ uses : actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
51
+ with :
52
+ path : ~/Library/Developer/Xcode/DerivedData/Amplify
53
+ key : amplify-packages-${{ hashFiles('Package.resolved') }}
54
+ restore-keys : |
55
+ amplify-packages-
56
+
57
+ - name : Attempt to restore the build cache
58
+ id : build-cache
59
+ timeout-minutes : 4
60
+ continue-on-error : true
61
+ uses : actions/cache/restore@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
62
+ with :
63
+ path : ${{ github.workspace }}/Build
64
+ key : Amplify-iOS-build-cache
65
+
66
+ - name : Run Local Server
67
+ run : |
68
+ cd ./AmplifyPlugins/Auth/Tests/AuthWebAuthnApp/LocalServer
69
+ npm install
70
+ npm start &
71
+ shell : bash
72
+
73
+ - name : Run iOS Integration Tests
74
+ id : run-tests
75
+ continue-on-error : true
76
+ uses : ./.github/composite_actions/run_xcodebuild_test
77
+ with :
78
+ scheme : AuthWebAuthnApp
79
+ destination : ${{ steps.platform.outputs.destination }}
80
+ sdk : ${{ steps.platform.outputs.sdk }}
81
+ xcode_path : /Applications/Xcode_${{ steps.platform.outputs.xcode-version }}.app
82
+ project_path : ./AmplifyPlugins/Auth/Tests/AuthWebAuthnApp
83
+ generate_coverage : false
84
+ cloned_source_packages_path : ~/Library/Developer/Xcode/DerivedData/Amplify
85
+ derived_data_path : ${{ github.workspace }}/Build
86
+ disable_package_resolution : ${{ steps.dependencies-cache.outputs.cache-hit }}
87
+
88
+ - name : Retry iOS Integration Tests
89
+ if : steps.run-tests.outcome=='failure'
90
+ id : retry-tests
91
+ uses : ./.github/composite_actions/run_xcodebuild_test
92
+ with :
93
+ scheme : AuthWebAuthnApp
94
+ destination : ${{ steps.platform.outputs.destination }}
95
+ sdk : ${{ steps.platform.outputs.sdk }}
96
+ xcode_path : /Applications/Xcode_${{ steps.platform.outputs.xcode-version }}.app
97
+ project_path : ./AmplifyPlugins/Auth/Tests/AuthWebAuthnApp
98
+ generate_coverage : false
99
+ cloned_source_packages_path : ~/Library/Developer/Xcode/DerivedData/Amplify
100
+ derived_data_path : ${{ github.workspace }}/Build
101
+ disable_package_resolution : true
0 commit comments