-
Notifications
You must be signed in to change notification settings - Fork 388
80 lines (65 loc) · 2.26 KB
/
dockerized-test.yml
File metadata and controls
80 lines (65 loc) · 2.26 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
76
77
78
79
80
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: Load environment variables
run: |
if [ -f .env ]; then
set -a
source .env
set +a
echo "HANDLERS_TO_BUILD=${HANDLERS_TO_BUILD}" >> $GITHUB_ENV
echo "OUTPUT_DIR=${OUTPUT_DIR}" >> $GITHUB_ENV
fi
- name: Build Lambda artifacts for testing
run: |
mkdir -p test/dockerized/tasks
OUTPUT_DIR="$(pwd)/test/dockerized/tasks" make build-examples
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" OUTPUT_DIR="$(pwd)/test/dockerized/tasks" make build-examples
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
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