Skip to content

Run e2e Tests

Run e2e Tests #750

Workflow file for this run

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/event-handler,
packages/tracer,
layers,
]
version: [20, 22, 24]
arch: [x86_64, arm64]
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
# 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 != '' }}
env:
PR_NUMBER: ${{ inputs.prNumber }}
run: |
set -euo pipefail
gh pr checkout "$PR_NUMBER"
- name: Setup Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version: 24
- name: Setup dependencies
uses: aws-powertools/actions/.github/actions/cached-node-modules@3b5b8e2e58b7af07994be982e83584a94e8c76c5 # v1.5.0
with:
node-version: 24
- name: Setup AWS credentials
uses: aws-actions/configure-aws-credentials@00943011d9042930efac3dcd3a170e4273319bc8 # v5.1.0
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 }}