-
Notifications
You must be signed in to change notification settings - Fork 92
80 lines (73 loc) · 1.91 KB
/
terratest.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
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: terraform-aws-vpc-peering
on:
push:
branches:
- master
paths-ignore:
- '**.md'
pull_request:
types:
- opened
- edited
- reopened
- synchronize
paths-ignore:
- '**.md'
jobs:
markdown-check:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Lint
uses: github/super-linter/slim@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
terraform-static:
name: terraform-fmt
runs-on: ubuntu-latest
strategy:
matrix:
terraform: ['1.5.7', '1.9.8']
steps:
- uses: actions/checkout@master
- uses: hashicorp/setup-terraform@v1
with:
terraform_version: ${{ matrix.terraform }}
- name: Terraform Format
id: fmt
run: terraform fmt -check
terratest:
name: terratest
runs-on: ubuntu-latest
strategy:
matrix:
terraform: ['1.5.7', '1.9.8']
steps:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.21'
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Install Build Dependencies
env:
TF_VERSION: ${{ matrix.terraform }}
run: >
wget https://releases.hashicorp.com/terraform/${TF_VERSION}/terraform_${TF_VERSION}_linux_amd64.zip -O /tmp/terraform.zip &&
sudo unzip -d /tmp/ /tmp/terraform.zip &&
sudo mv /tmp/terraform /usr/local/bin/ &&
go install github.com/kyoh86/richgo@latest
- name: Start Localstack
uses: LocalStack/[email protected]
with:
image-tag: "latest"
- name: Terratest
env:
GOPATH: /home/runner/work/terraform-aws-vpc-peering/go
run: >
go mod init github.com/grem11n/terraform-aws-vpc-peering &&
go mod tidy &&
richgo test -v -timeout=30m ./...