Skip to content

Commit 8fec653

Browse files
authored
chore: Run api and datastore integ test as different jobs (#1754)
1 parent 1085cf9 commit 8fec653

File tree

1 file changed

+142
-15
lines changed

1 file changed

+142
-15
lines changed

.github/workflows/integ_test.yml

Lines changed: 142 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: IntegrationTest
22
on:
33
push:
4-
branches: [main] # Will change to main
4+
branches: [main]
55

66
permissions:
77
id-token: write
@@ -46,7 +46,6 @@ jobs:
4646
with:
4747
resource_subfolder: analytics
4848
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
49-
external_id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
5049
aws_region: ${{ secrets.AWS_REGION }}
5150
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
5251

@@ -56,7 +55,7 @@ jobs:
5655
project_path: ./AmplifyPlugins/Analytics/
5756
workspace: AnalyticsCategoryPlugin.xcworkspace
5857
scheme: AWSPinpointAnalyticsPluginIntegrationTests
59-
58+
6059
api-integration-test:
6160
needs: prepare-for-test
6261
runs-on: macos-latest
@@ -74,48 +73,144 @@ jobs:
7473
with:
7574
resource_subfolder: api
7675
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
77-
external_id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
7876
aws_region: ${{ secrets.AWS_REGION }}
7977
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
8078

81-
- name: List the copied configurations
82-
run: ls ~/.aws-amplify/amplify-ios/testconfiguration/
83-
8479
- name: Run Integration test
8580
uses: ./.github/composite_actions/run_xcodebuild_test
8681
with:
8782
project_path: ./AmplifyPlugins/API/
8883
workspace: APICategoryPlugin.xcworkspace
8984
scheme: AWSAPICategoryPluginFunctionalTests
9085

86+
api-graphqliam-integration-test:
87+
needs: [api-integration-test]
88+
runs-on: macos-latest
89+
environment: IntegrationTest
90+
steps:
91+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
92+
with:
93+
persist-credentials: false
94+
95+
- name: Make directory
96+
run: mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
97+
98+
- name: Copy integration test resouces
99+
uses: ./.github/composite_actions/download_test_configuration
100+
with:
101+
resource_subfolder: api
102+
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
103+
aws_region: ${{ secrets.AWS_REGION }}
104+
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
105+
91106
- name: Run Integration test
92107
uses: ./.github/composite_actions/run_xcodebuild_test
93108
with:
94109
project_path: ./AmplifyPlugins/API/
95110
workspace: APICategoryPlugin.xcworkspace
96111
scheme: GraphQLWithIAMIntegrationTests
97112

113+
api-graphqluserpool-integration-test:
114+
needs: [api-integration-test]
115+
runs-on: macos-latest
116+
environment: IntegrationTest
117+
steps:
118+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
119+
with:
120+
persist-credentials: false
121+
122+
- name: Make directory
123+
run: mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
124+
125+
- name: Copy integration test resouces
126+
uses: ./.github/composite_actions/download_test_configuration
127+
with:
128+
resource_subfolder: api
129+
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
130+
aws_region: ${{ secrets.AWS_REGION }}
131+
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
132+
98133
- name: Run Integration test
99134
uses: ./.github/composite_actions/run_xcodebuild_test
100135
with:
101136
project_path: ./AmplifyPlugins/API/
102137
workspace: APICategoryPlugin.xcworkspace
103138
scheme: GraphQLWithUserPoolIntegrationTests
104139

140+
api-restiam-integration-test:
141+
needs: [api-integration-test]
142+
runs-on: macos-latest
143+
environment: IntegrationTest
144+
steps:
145+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
146+
with:
147+
persist-credentials: false
148+
149+
- name: Make directory
150+
run: mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
151+
152+
- name: Copy integration test resouces
153+
uses: ./.github/composite_actions/download_test_configuration
154+
with:
155+
resource_subfolder: api
156+
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
157+
aws_region: ${{ secrets.AWS_REGION }}
158+
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
159+
105160
- name: Run Integration test
106161
uses: ./.github/composite_actions/run_xcodebuild_test
107162
with:
108163
project_path: ./AmplifyPlugins/API/
109164
workspace: APICategoryPlugin.xcworkspace
110165
scheme: RESTWithIAMIntegrationTests
111166

167+
api-restuserpool-integration-test:
168+
needs: [api-integration-test]
169+
runs-on: macos-latest
170+
environment: IntegrationTest
171+
steps:
172+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
173+
with:
174+
persist-credentials: false
175+
176+
- name: Make directory
177+
run: mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
178+
179+
- name: Copy integration test resouces
180+
uses: ./.github/composite_actions/download_test_configuration
181+
with:
182+
resource_subfolder: api
183+
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
184+
aws_region: ${{ secrets.AWS_REGION }}
185+
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
186+
112187
- name: Run Integration test
113188
uses: ./.github/composite_actions/run_xcodebuild_test
114189
with:
115190
project_path: ./AmplifyPlugins/API/
116191
workspace: APICategoryPlugin.xcworkspace
117192
scheme: RESTWithUserPoolIntegrationTests
118193

194+
api-graphqllambda-integration-test:
195+
needs: [api-integration-test]
196+
runs-on: macos-latest
197+
environment: IntegrationTest
198+
steps:
199+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
200+
with:
201+
persist-credentials: false
202+
203+
- name: Make directory
204+
run: mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
205+
206+
- name: Copy integration test resouces
207+
uses: ./.github/composite_actions/download_test_configuration
208+
with:
209+
resource_subfolder: api
210+
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
211+
aws_region: ${{ secrets.AWS_REGION }}
212+
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
213+
119214
- name: Run Integration test
120215
uses: ./.github/composite_actions/run_xcodebuild_test
121216
with:
@@ -140,7 +235,6 @@ jobs:
140235
with:
141236
resource_subfolder: auth
142237
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
143-
external_id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
144238
aws_region: ${{ secrets.AWS_REGION }}
145239
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
146240

@@ -168,27 +262,63 @@ jobs:
168262
with:
169263
resource_subfolder: datastore
170264
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
171-
external_id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
172265
aws_region: ${{ secrets.AWS_REGION }}
173266
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
174267

175-
- name: List the copied configurations
176-
run: ls ~/.aws-amplify/amplify-ios/testconfiguration/
177-
178268
- name: Run Integration test
179269
uses: ./.github/composite_actions/run_xcodebuild_test
180270
with:
181271
project_path: ./AmplifyPlugins/DataStore/
182272
workspace: DataStoreCategoryPlugin.xcworkspace
183273
scheme: AWSDataStoreCategoryPluginIntegrationTests
184274

275+
datastore-auth-integration-test:
276+
needs: [datastore-integration-test]
277+
runs-on: macos-latest
278+
environment: IntegrationTest
279+
steps:
280+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
281+
with:
282+
persist-credentials: false
283+
284+
- name: Make directory
285+
run: mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
286+
287+
- name: Copy integration test resouces
288+
uses: ./.github/composite_actions/download_test_configuration
289+
with:
290+
resource_subfolder: datastore
291+
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
292+
aws_region: ${{ secrets.AWS_REGION }}
293+
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
294+
185295
- name: Run Integration test
186296
uses: ./.github/composite_actions/run_xcodebuild_test
187297
with:
188298
project_path: ./AmplifyPlugins/DataStore/
189299
workspace: DataStoreCategoryPlugin.xcworkspace
190300
scheme: AWSDataStoreCategoryPluginAuthIntegrationTests
191301

302+
datastore-flutter-integration-test:
303+
needs: [datastore-integration-test]
304+
runs-on: macos-latest
305+
environment: IntegrationTest
306+
steps:
307+
- uses: actions/checkout@ec3a7ce113134d7a93b817d10a8272cb61118579
308+
with:
309+
persist-credentials: false
310+
311+
- name: Make directory
312+
run: mkdir -p ~/.aws-amplify/amplify-ios/testconfiguration/
313+
314+
- name: Copy integration test resouces
315+
uses: ./.github/composite_actions/download_test_configuration
316+
with:
317+
resource_subfolder: datastore
318+
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
319+
aws_region: ${{ secrets.AWS_REGION }}
320+
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
321+
192322
- name: Run Integration test
193323
uses: ./.github/composite_actions/run_xcodebuild_test
194324
with:
@@ -213,7 +343,6 @@ jobs:
213343
with:
214344
resource_subfolder: geo
215345
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
216-
external_id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
217346
aws_region: ${{ secrets.AWS_REGION }}
218347
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
219348

@@ -241,7 +370,6 @@ jobs:
241370
with:
242371
resource_subfolder: predictions
243372
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
244-
external_id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
245373
aws_region: ${{ secrets.AWS_REGION }}
246374
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
247375

@@ -279,7 +407,6 @@ jobs:
279407
with:
280408
resource_subfolder: storage
281409
aws_role_to_assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
282-
external_id: ${{ secrets.AWS_ROLE_EXTERNAL_ID }}
283410
aws_region: ${{ secrets.AWS_REGION }}
284411
aws_s3_bucket: ${{ secrets.AWS_S3_BUCKET_INTEG }}
285412

0 commit comments

Comments
 (0)