[feature] Add workflow step to run terratest test (#5)

This commit is contained in:
sidpalas
2021-07-05 19:24:17 -07:00
committed by GitHub
parent a35c1c0632
commit d276ae7b6e

View File

@@ -1,7 +1,7 @@
name: "Terraform" name: "Terraform"
on: on:
# Uncomment to enable staging # Uncomment to enable staging deployment
# push: # push:
# branches: # branches:
# - main # - main
@@ -27,6 +27,7 @@ jobs:
uses: hashicorp/setup-terraform@v1 uses: hashicorp/setup-terraform@v1
with: with:
terraform_version: 1.0.1 terraform_version: 1.0.1
terraform_wrapper: false
- name: Terraform Format - name: Terraform Format
id: fmt id: fmt
@@ -39,6 +40,7 @@ jobs:
- name: Terraform Plan - name: Terraform Plan
id: plan id: plan
if: github.event_name == 'pull_request' 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 run: terraform plan -var db_pass=${{secrets.DB_PASS }} -no-color
continue-on-error: true continue-on-error: true
@@ -73,6 +75,16 @@ jobs:
if: steps.plan.outcome == 'failure' if: steps.plan.outcome == 'failure'
run: exit 1 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 - name: Check tag
id: check-tag id: check-tag
run: | run: |