-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (49 loc) · 1.47 KB
/
run-e2e-tests.yaml
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
name: E2E Test Workflow
on:
pull_request:
branches:
- develop
- main
jobs:
run-e2e-tests:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: '1.22'
- name: Install AWS SAM CLI
run: |
pip install aws-sam-cli
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_E2E_ROLE }}
aws-region: us-east-1
- name: Run e2e tests
env:
NEW_RELIC_USER_KEY: ${{ secrets.NEW_RELIC_USER_KEY }}
NEW_RELIC_LICENSE_KEY: ${{ secrets.NEW_RELIC_LICENSE_KEY }}
S3_BUCKET: unified-lambda-e2e-test-templates
run: |
cd e2e-tests/
./build-templates.sh
echo "Running s3 and cloudwatch trigger tests parallely"
./lambda-cloudwatch-trigger.sh &
pid1=$!
echo "Testing setting up cloudwatch trigger with PID: $pid1"
./lambda-s3-trigger.sh &
pid2=$!
echo "Testing setting up s3 trigger with PID: $pid2"
wait $pid1
wait $pid2
- name: Delete Resources
env:
S3_BUCKET: unified-lambda-e2e-test-templates
run:
aws s3 rm "s3://$S3_BUCKET" --recursive