-
Notifications
You must be signed in to change notification settings - Fork 66
57 lines (46 loc) · 1.31 KB
/
test.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
name: Test
on: push
jobs:
lambda_tests:
permissions:
contents: read
runs-on: ubuntu-latest
env:
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
steps:
- uses: actions/checkout@v4
- name: Run tests
run: |
pip install pip --upgrade
pip install pyopenssl --upgrade
pip install -r functions/replace-route/requirements.txt
pip install -r functions/replace-route/tests/test_requirements.txt
python -m pytest
terraform_tests:
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./test
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: test/go.mod
cache-dependency-path: test/go.sum
- name: Go Tidy
run: go mod tidy && git diff --exit-code
- name: Go Mod
run: go mod download
- name: Go mod verify
run: go mod verify
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.TERRATEST_ROLE_TO_ASSUME }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Run tests
run: go test -v -timeout 60m