Skip to content

Trigger tests

Trigger tests #47

Workflow file for this run

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