diff --git a/.github/workflows/integ.yml b/.github/workflows/integ.yml index 164d1cb..701e005 100644 --- a/.github/workflows/integ.yml +++ b/.github/workflows/integ.yml @@ -123,25 +123,39 @@ jobs: JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION: "true" JSII_SILENCE_WARNING_KNOWN_BROKEN_NODE_VERSION: "true" DOCKERHUB_DISABLED: "true" - AWS_REGIONS: us-east-2,eu-west-1,eu-north-1,ap-northeast-1,ap-south-1 + AWS_REGIONS: ${{ matrix.suite.regions || 'us-east-2,eu-west-1,eu-north-1,ap-northeast-1,ap-south-1' }} CDK_MAJOR_VERSION: "2" RELEASE_TAG: latest GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: bin/run-suite --use-cli-release=${{ steps.versions.outputs.cli_version }} --framework-version=${{ steps.versions.outputs.lib_version }} ${{ matrix.suite }} + run: bin/run-suite --use-cli-release=${{ steps.versions.outputs.cli_version }} --framework-version=${{ steps.versions.outputs.lib_version }} ${{ matrix.suite.suite }} ${{ matrix.suite.shard && format('--shard={0}', matrix.suite.shard) || '' }} strategy: fail-fast: false matrix: suite: - - cli-integ-tests - - init-csharp - - init-fsharp - - init-go - - init-java - - init-javascript - - init-python - - init-typescript-app - - init-typescript-lib - - tool-integrations + - suite: cli-integ-tests + regions: us-east-2 + shard: 1/5 + - suite: cli-integ-tests + regions: eu-west-1 + shard: 2/5 + - suite: cli-integ-tests + regions: eu-north-1 + shard: 3/5 + - suite: cli-integ-tests + regions: ap-northeast-1 + shard: 4/5 + - suite: cli-integ-tests + regions: ap-south-1 + shard: 5/5 + - suite: init-csharp + - suite: init-fsharp + - suite: init-go + - suite: init-java + - suite: init-javascript + - suite: init-python + - suite: init-typescript-app + - suite: init-typescript-lib + - suite: tool-integrations integ: needs: - prepare diff --git a/.projen/tasks.json b/.projen/tasks.json index 781bd55..2d00046 100644 --- a/.projen/tasks.json +++ b/.projen/tasks.json @@ -3,9 +3,6 @@ "build": { "name": "build", "steps": [ - { - "spawn": "default" - }, { "exec": "yarn workspaces run build" } @@ -57,7 +54,7 @@ "description": "Synthesize project files", "steps": [ { - "exec": "ts-node --project tsconfig.dev.json .projenrc.ts" + "exec": "echo 1" } ] }, diff --git a/packages/@aws-cdk-testing/cli-integ/lib/cli/run-suite.ts b/packages/@aws-cdk-testing/cli-integ/lib/cli/run-suite.ts index e214714..ba1d0df 100644 --- a/packages/@aws-cdk-testing/cli-integ/lib/cli/run-suite.ts +++ b/packages/@aws-cdk-testing/cli-integ/lib/cli/run-suite.ts @@ -65,6 +65,11 @@ async function main() { type: 'boolean', requiresArg: false, }) + .options('shard', { + description: 'The test suite shard to execute in a format of (?\\d+)/(?\\d+).', + type: 'string', + requiresArg: true, + }) .help() .showHelpOnFail(false) .argv; @@ -128,6 +133,7 @@ async function main() { ...args.verbose ? ['--verbose'] : [], ...passWithNoTests ? ['--passWithNoTests'] : [], ...args['test-file'] ? [args['test-file']] : [], + ...args.shard ? [`--shard=${args.shard}`] : [], ], path.resolve(__dirname, '..', '..', 'resources', 'integ.jest.config.js')); } finally { await packageSource.cleanup();