-
Notifications
You must be signed in to change notification settings - Fork 8
48 lines (47 loc) · 1.38 KB
/
test.yaml
File metadata and controls
48 lines (47 loc) · 1.38 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
name: Test
on:
workflow_call:
jobs:
lint-validate:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v2
- name: Init
run: terraform init
- name: Validate
run: terraform validate
- name: tfsec
uses: aquasecurity/tfsec-action@v1.0.2
- name: Setup TFLint
uses: terraform-linters/setup-tflint@v2
- name: Install tflint plugins
run: tflint --init
- name: Lint Terraform files
run: tflint
terratest:
runs-on: ubuntu-20.04
defaults:
run:
working-directory: tests
services:
localstack-first-account:
image: localstack/localstack
ports:
- 4566:4566
localstack-second-account:
image: localstack/localstack
env:
EDGE_PORT: 4567
ports:
- 4567:4567
steps:
- uses: actions/checkout@v3
- uses: hashicorp/setup-terraform@v2
with:
terraform_wrapper: false
- uses: actions/setup-go@v3
- run: echo ../scenarios/config ../scenarios/config_iam_vpc_one_account ../scenarios/iam_one_account ../scenarios/vpc | xargs -n 1 cp mocks/mock_provider.tf
- run: echo ../scenarios/config_iam_vpc_two_accounts ../scenarios/iam_two_accounts | xargs -n 1 cp mocks/two_mock_providers.tf
- name: terratest
run: go test