-
Notifications
You must be signed in to change notification settings - Fork 24
50 lines (48 loc) · 1.17 KB
/
build.yml
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
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
name: Build and Test
jobs:
build_test:
strategy:
matrix:
version: ['1.5.7', 'latest']
tool: ['terraform', 'tofu']
exclude:
- tool: tofu
version: '1.5.7'
timeout-minutes: 30
runs-on: ubuntu-latest
env:
AWS_DEFAULT_REGION: us-east-1
DNS_ADDRESS: 127.0.0.1
TF_CMD: ${{matrix.tool}}
steps:
- uses: hashicorp/setup-terraform@v3
if: ${{ matrix.tool == 'terraform' }}
with:
terraform_version: ${{matrix.version}}
- uses: opentofu/setup-opentofu@v1
if: ${{ matrix.tool == 'tofu' }}
with:
tofu_version: ${{matrix.version}}
tofu_wrapper: false
- name: Check out code
uses: actions/checkout@v3
- name: Pull LocalStack Docker image
run: docker pull localstack/localstack &
- name: Set up Python 3.12
uses: actions/setup-python@v2
with:
python-version: '3.12'
- name: Install dependencies
run: make install
- name: Run code linter
run: make lint
- name: Run tests
run: make test