Skip to content

Commit

Permalink
Merge pull request #2303 from aws-amplify/main
Browse files Browse the repository at this point in the history
  • Loading branch information
dpilch authored Feb 28, 2024
2 parents 9791c1a + f7ec601 commit dbdbaf4
Show file tree
Hide file tree
Showing 86 changed files with 4,998 additions and 1,922 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,7 @@ const chain = (context: Context): ExecutionContext => {
.join('\n')
: 'No output';
const err = new Error(
`Killed the process as no output receive for ${context.noOutputTimeout / 1000} Sec. The no output timeout is set to ${
`Killed the process as no output received for ${context.noOutputTimeout / 1000} Sec. The no output timeout is set to ${
context.noOutputTimeout / 1000
} seconds.\n\nLast 10 lines:👇🏽👇🏽👇🏽👇🏽\n\n\n\n\n${lastScreen}\n\n\n👆🏼👆🏼👆🏼👆🏼`,
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const createDetailComponent = <T extends any>({ deleteMutation, recordNam
? <ViewComp record={record} />
: <EditComp record={record} />
}
<Button id={`delete-${recordName}`} size='small' onClick={() => wrappedFn(context)}>Delete</Button>
<Button id={`delete-${recordName}`} size='small' onClick={async () => { await wrappedFn(context); }}>Delete</Button>
<OperationStateIndicator id={`${recordName}-is-deleted`} state={opState} />
{ detailState === 'view'
? <Button size='small' onClick={() => setDetailState('edit')}>Edit</Button>
Expand Down Expand Up @@ -67,7 +67,7 @@ export const createCreateRecordComponent = ({ recordName, createMutation, sentin
<Heading level={3}>Create A { capitalizedRecordName }</Heading>
<Flex direction='row'>
<TextField id={`${recordName}-id-input`} label='Test Id' onChange={(event: any) => { setId(event.target.value) }}/>
<Button id={`${recordName}-create`} onClick={() => wrappedFn(context)}>Create { capitalizedRecordName }</Button>
<Button id={`${recordName}-create`} onClick={async () => { await wrappedFn(context); }}>Create { capitalizedRecordName }</Button>
<OperationStateIndicator id={`${recordName}-is-created`} state={opState} />
</Flex>
</Flex>
Expand Down Expand Up @@ -102,7 +102,7 @@ export const createGetRecordComponent = <T extends any>({ getQuery, recordName,
<Heading level={3}>Get A { capitalizedRecordName }</Heading>
<Flex direction='row'>
<TextField id={`retrieve-${recordName}-id`} label={`${capitalizedRecordName} Id`} onChange={(event: any) => { setId(event.target.value) }}/>
<Button id={`retrieve-${recordName}-button`} onClick={() => wrappedFn(context)}>Get { capitalizedRecordName }</Button>
<Button id={`retrieve-${recordName}-button`} onClick={async () => { await wrappedFn(context); }}>Get { capitalizedRecordName }</Button>
<OperationStateIndicator id={`${recordName}-is-retrieved`} state={opState} />
</Flex>
<div id={`retrieved-${recordName}`}>
Expand Down Expand Up @@ -138,7 +138,7 @@ export const createListComponent = <T extends any>({ listQuery, recordName, Deta
<Flex direction='column'>
<Heading level={3}>List { capitalizedPluralizedRecordName }</Heading>
<Flex direction='row'>
<Button id={`list-${pluralizedRecordName}`} onClick={() => wrappedFn(context)}>Load { capitalizedPluralizedRecordName }</Button>
<Button id={`list-${pluralizedRecordName}`} onClick={async () => { await wrappedFn(context); }}>Load { capitalizedPluralizedRecordName }</Button>
<OperationStateIndicator id={`${pluralizedRecordName}-are-listed`} state={opState} />
</Flex>
<div id={`listed-${pluralizedRecordName}`}>
Expand Down Expand Up @@ -204,7 +204,7 @@ export const createEditComp = <T extends object>({ updateMutation, fields, recor
}}
/>
) }) }
<Button id={`update-${recordName}`} onClick={() => wrappedFn(context)}>Update</Button>
<Button id={`update-${recordName}`} onClick={async () => { await wrappedFn(context); }}>Update</Button>
<OperationStateIndicator id={`${recordName}-is-updated`} state={opState} />
</Flex>
}
Expand Down
235 changes: 235 additions & 0 deletions codebuild_specs/createapi_canary_workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
version: 0.2
env:
shell: bash
compute-type: BUILD_GENERAL1_MEDIUM
batch:
fast-fail: false
build-graph:
- identifier: build_linux
buildspec: codebuild_specs/build_linux.yml
env:
compute-type: BUILD_GENERAL1_LARGE
- identifier: test
buildspec: codebuild_specs/test.yml
env:
compute-type: BUILD_GENERAL1_LARGE
depend-on:
- build_linux
- identifier: mock_e2e_tests
buildspec: codebuild_specs/mock_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
depend-on:
- build_linux
- identifier: publish_to_local_registry
buildspec: codebuild_specs/publish_to_local_registry.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
depend-on:
- build_linux
- identifier: api_test_us_east_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: us-east-1
depend-on:
- publish_to_local_registry
- identifier: api_test_ap_northeast_2
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: ap-northeast-2
depend-on:
- publish_to_local_registry
- identifier: api_test_ap_south_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: ap-south-1
depend-on:
- publish_to_local_registry
- identifier: api_test_ap_southeast_2
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: ap-southeast-2
depend-on:
- publish_to_local_registry
- identifier: api_test_eu_central_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: eu-central-1
depend-on:
- publish_to_local_registry
- identifier: api_test_us_east_2
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: us-east-2
depend-on:
- publish_to_local_registry
- identifier: api_test_ap_southeast_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: ap-southeast-1
depend-on:
- publish_to_local_registry
- identifier: api_test_ca_central_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: ca-central-1
depend-on:
- publish_to_local_registry
- identifier: api_test_eu_west_2
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: eu-west-2
depend-on:
- publish_to_local_registry
- identifier: api_test_us_west_2
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: us-west-2
depend-on:
- publish_to_local_registry
- identifier: api_test_ap_east_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: ap-east-1
depend-on:
- publish_to_local_registry
- identifier: api_test_ap_northeast_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: ap-northeast-1
depend-on:
- publish_to_local_registry
- identifier: api_test_ap_northeast_3
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: ap-northeast-3
depend-on:
- publish_to_local_registry
- identifier: api_test_eu_north_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: eu-north-1
depend-on:
- publish_to_local_registry
- identifier: api_test_eu_west_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: eu-west-1
depend-on:
- publish_to_local_registry
- identifier: api_test_eu_south_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: eu-south-1
depend-on:
- publish_to_local_registry
- identifier: api_test_eu_west_3
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: eu-west-3
depend-on:
- publish_to_local_registry
- identifier: api_test_me_south_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: me-south-1
depend-on:
- publish_to_local_registry
- identifier: api_test_sa_east_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: sa-east-1
depend-on:
- publish_to_local_registry
- identifier: api_test_us_west_1
buildspec: codebuild_specs/run_canary_e2e_tests.yml
env:
compute-type: BUILD_GENERAL1_MEDIUM
variables:
TEST_SUITE: >-
src/__tests__/api_canary.test.ts
CLI_REGION: us-west-1
depend-on:
- publish_to_local_registry
# - identifier: cleanup_e2e_resources
# buildspec: codebuild_specs/cleanup_e2e_resources.yml
# env:
# compute-type: BUILD_GENERAL1_SMALL
# depend-on:
# - api_test_us_east_1
Loading

0 comments on commit dbdbaf4

Please sign in to comment.