-
Notifications
You must be signed in to change notification settings - Fork 192
75 lines (72 loc) · 2.39 KB
/
run-e2e-tests.yml
File metadata and controls
75 lines (72 loc) · 2.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
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,
packages/batch,
layers,
]
version: [22, 24]
arch: [x86_64, arm64]
fail-fast: false
steps:
- name: Checkout Repo
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# 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@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.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@ec61189d14ec14c8efccab744f656cffd0e33f37 # v6.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 }}