Skip to content

Commit

Permalink
[feature] Add workflow step to run terratest test (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
sidpalas authored Jul 6, 2021
1 parent a35c1c0 commit d276ae7
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: "Terraform"

on:
# Uncomment to enable staging
# Uncomment to enable staging deployment
# push:
# branches:
# - main
Expand All @@ -27,6 +27,7 @@ jobs:
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 1.0.1
terraform_wrapper: false

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

Expand Down Expand Up @@ -73,6 +75,16 @@ jobs:
if: steps.plan.outcome == 'failure'
run: exit 1

- uses: actions/setup-go@v2
with:
go-version: '^1.15.5'

- name : Terratest Execution
if: github.event_name == 'pull_request'
working-directory: 08-testing/tests/terratest
run: |
go test . -v timeout 10m
- name: Check tag
id: check-tag
run: |
Expand Down

0 comments on commit d276ae7

Please sign in to comment.