Run e2e Tests #699
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Run e2e Tests | |
on: | |
workflow_dispatch: | |
inputs: | |
prNumber: | |
description: 'Optional PR number to checkout useful to run e2e tests on forks. When specified the branch field will be ignored.' | |
required: false | |
default: '' | |
permissions: | |
contents: read | |
jobs: | |
run-e2e-tests-on-utils: | |
runs-on: ubuntu-latest | |
env: | |
NODE_ENV: dev | |
PR_NUMBER: ${{ inputs.prNumber }} | |
GH_TOKEN: ${{ github.token }} | |
environment: e2e-tests | |
permissions: | |
id-token: write # needed to interact with GitHub's OIDC Token endpoint. | |
contents: read | |
strategy: | |
max-parallel: 25 | |
matrix: | |
package: | |
[ | |
packages/idempotency, | |
packages/logger, | |
packages/metrics, | |
packages/parameters, | |
packages/tracer, | |
layers, | |
] | |
version: [20, 22] | |
arch: [x86_64, arm64] | |
fail-fast: false | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
# Only if a PR Number was passed and the headSHA of the PR extracted, | |
# we checkout the PR at that point in time | |
- name: Checkout PR code | |
if: ${{ inputs.prNumber != '' }} | |
run: | | |
gh pr checkout ${{ inputs.prNumber }} | |
- name: Setup Node.js | |
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 | |
with: | |
node-version: '22' | |
- name: Setup dependencies | |
uses: aws-powertools/actions/.github/actions/cached-node-modules@3b5b8e2e58b7af07994be982e83584a94e8c76c5 # v1.5.0 | |
with: | |
node-version: '22' | |
- name: Setup AWS credentials | |
uses: aws-actions/configure-aws-credentials@7474bc4690e29a8392af63c5b98e7449536d5c3a # v4.3.1 | |
with: | |
role-to-assume: ${{ secrets.E2E_IAM_ROLE_ARN }} | |
aws-region: eu-west-1 | |
mask-aws-account-id: true | |
- name: Run e2e ${{ matrix.package }}-${{ matrix.version }}-${{ matrix.arch }} | |
env: | |
RUNTIME: nodejs${{ matrix.version }}x | |
CI: true | |
ARCH: ${{ matrix.arch }} | |
JSII_SILENCE_WARNING_DEPRECATED_NODE_VERSION: true | |
RUNNER_DEBUG: ${{ env.RUNNER_DEBUG }} | |
run: npm run test:e2e -w ${{ matrix.package }} |