-
Notifications
You must be signed in to change notification settings - Fork 396
72 lines (58 loc) · 2.16 KB
/
Copy pathdockerized-test.yml
File metadata and controls
72 lines (58 loc) · 2.16 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
name: dockerized-test
permissions:
contents: read
on:
push:
branches: [ main ]
pull_request:
branches: [ '*' ]
workflow_dispatch:
jobs:
dockerized-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build Lambda artifacts for testing
run: |
mkdir -p test/dockerized/tasks
HANDLERS_TO_BUILD="basic-lambda basic-sqs http-basic-lambda basic-lambda-concurrent" OUTPUT_DIR="$(pwd)/test/dockerized/tasks" ./scripts/build-examples.sh
ls -la test/dockerized/tasks/
- name: Build base test image with RIE and custom entrypoint
run: |
docker build . -t local/test-base -f Dockerfile.test
- name: Run tests
uses: aws/containerized-test-runner-for-aws-lambda@main
with:
suiteFileArray: '["./test/dockerized/suites/*.json"]'
dockerImageName: 'local/test-base'
taskFolder: './test/dockerized/tasks'
dockerized-test-concurrent:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build Lambda artifacts for testing
run: |
mkdir -p test/dockerized/tasks
HANDLERS_TO_BUILD="basic-lambda-concurrent invocation-id-concurrent" OUTPUT_DIR="$(pwd)/test/dockerized/tasks" ./scripts/build-examples.sh
ls -la test/dockerized/tasks/
- name: Build base test image with RIE and custom entrypoint
run: docker build -t local/test-base -f Dockerfile.test .
- name: Create Docker network for concurrent tests
run: docker network create concurrent-test-net
- name: Run concurrent scenarios
uses: aws/containerized-test-runner-for-aws-lambda@main
env:
CONTAINER_READY_DELAY_SECS: 5
with:
suiteFileArray: '[]'
dockerImageName: 'local/test-base'
taskFolder: './test/dockerized/tasks'
scenarioDir: './test/dockerized/scenarios'
dockerSharedNetwork: 'concurrent-test-net'
- name: Remove Docker network
if: always()
run: docker network rm concurrent-test-net || true