diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index e3ef3f232f..d147e63a50 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -144,6 +144,23 @@ jobs: run: | echo "ec2_linux_matrix: ${{ steps.set-matrix.outputs.ec2_linux_matrix }}" + StartLocalStackCN: + name: 'StartLocalStackCN' + needs: [ OutputEnvVariables ] + uses: ./.github/workflows/start-localstack.yml + secrets: inherit + permissions: + id-token: write + contents: read + with: + region: cn-north-1 + test_repo_name: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_NAME }} + test_repo_branch: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_BRANCH }} + terraform_assume_role: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_CN }} + test_repo_url: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_URL }} + github_sha: ${{github.sha}} + s3_integration_bucket: ${{ vars.S3_INTEGRATION_BUCKET_CN }} + CloudformationTest: needs: [GenerateTestMatrix] name: 'CFTest' @@ -250,4 +267,21 @@ jobs: region: cn-north-1 terraform_assume_role: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_CN }} s3_integration_bucket: ${{ vars.S3_INTEGRATION_BUCKET_CN }} - secrets: inherit \ No newline at end of file + secrets: inherit + + StopLocalStackCN: + name: 'StopLocalStackCN' + if: ${{ always() && needs.StartLocalStackCN.result == 'success' }} + needs: [ StartLocalStackCN, EC2LinuxIntegrationTestCN ] + uses: ./.github/workflows/stop-localstack.yml + secrets: inherit + permissions: + id-token: write + contents: read + with: + region: cn-north-1 + test_repo_name: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_NAME }} + test_repo_branch: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_BRANCH }} + terraform_assume_role: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_CN }} + github_sha: ${{github.sha}} + s3_integration_bucket: ${{ vars.S3_INTEGRATION_BUCKET_CN }} \ No newline at end of file