Skip to content

Commit d276ae7

Browse files
authored
[feature] Add workflow step to run terratest test (#5)
1 parent a35c1c0 commit d276ae7

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/terraform.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: "Terraform"
22

33
on:
4-
# Uncomment to enable staging
4+
# Uncomment to enable staging deployment
55
# push:
66
# branches:
77
# - main
@@ -27,6 +27,7 @@ jobs:
2727
uses: hashicorp/setup-terraform@v1
2828
with:
2929
terraform_version: 1.0.1
30+
terraform_wrapper: false
3031

3132
- name: Terraform Format
3233
id: fmt
@@ -39,6 +40,7 @@ jobs:
3940
- name: Terraform Plan
4041
id: plan
4142
if: github.event_name == 'pull_request'
43+
# Route 53 zone must already exist for this to succeed!
4244
run: terraform plan -var db_pass=${{secrets.DB_PASS }} -no-color
4345
continue-on-error: true
4446

@@ -73,6 +75,16 @@ jobs:
7375
if: steps.plan.outcome == 'failure'
7476
run: exit 1
7577

78+
- uses: actions/setup-go@v2
79+
with:
80+
go-version: '^1.15.5'
81+
82+
- name : Terratest Execution
83+
if: github.event_name == 'pull_request'
84+
working-directory: 08-testing/tests/terratest
85+
run: |
86+
go test . -v timeout 10m
87+
7688
- name: Check tag
7789
id: check-tag
7890
run: |

0 commit comments

Comments
 (0)