diff --git a/.github/workflows/e2e-tests.yml b/.github/workflows/e2e-tests.yml index 5bc1af29..74b537cb 100644 --- a/.github/workflows/e2e-tests.yml +++ b/.github/workflows/e2e-tests.yml @@ -21,20 +21,44 @@ permissions: contents: read jobs: - deploy-core-stack: - uses: ./.github/workflows/e2e-infra-deploy.yml - - deploy-aot-stack: - uses: ./.github/workflows/e2e-infra-deploy.yml - run-tests: + deploy-core-stack: runs-on: aws-powertools_ubuntu-latest_8-core -# needs: [deploy-core-stack, deploy-aot-stack] - needs: [deploy-core-stack] + permissions: + id-token: write + contents: read steps: - name: Checkout code uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@e3dd6a429d7300a6a4c196c26e071d42e0343502 # v4.0.2 + with: + role-to-assume: ${{ secrets.E2E_DEPLOY_ROLE }} + aws-region: us-east-1 + mask-aws-account-id: true + + - name: Set up .NET + uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 + with: + dotnet-version: '8.x' + + - name: Setup Node.js + uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0 + with: + node-version: "20.10.0" + + - name: Install CDK + run: npm install -g aws-cdk + + - name: Deploy Core Stack + run: | + cd libraries/tests/e2e/infra + cdk deploy --require-approval never + + - name: Checkout code + uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + - name: Set up .NET uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 with: @@ -44,10 +68,28 @@ jobs: run: | cd libraries/tests/e2e/functions/core dotnet test + +# run-tests: +# runs-on: aws-powertools_ubuntu-latest_8-core +# # needs: [deploy-core-stack, deploy-aot-stack] +# # needs: [deploy-core-stack] +# steps: +# - name: Checkout code +# uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 + +# - name: Set up .NET +# uses: actions/setup-dotnet@4d6c8fcf3c8f7a60068d26b594648e99df24cee3 +# with: +# dotnet-version: '8.x' + +# - name: Run Core Tests +# run: | +# cd libraries/tests/e2e/functions/core +# dotnet test - - name: Destroy Core Stack - if: always() - uses: ./.github/workflows/e2e-infra-destroy.yml +# - name: Destroy Core Stack +# if: always() +# uses: ./.github/workflows/e2e-infra-destroy.yml # destroy-core-stack: # needs: run-tests