Skip to content

Commit

Permalink
Add github action for terraform test and lint
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed Dec 17, 2024
1 parent fd35902 commit 904c49d
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Terraform Test

on:
pull_request:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
name: Integration test
steps:
- uses: actions/checkout@v4

- name: terraform validate
uses: dflook/terraform-validate@v1

- name: terraform fmt
uses: dflook/terraform-fmt-check@v1

- name: terraform test
uses: dflook/terraform-test@v1
env:
CF_USER: ${{ secrets.CF_USER }}
CF_PASSWORD: ${{ secrets.CF_PASSWORD }}
TF_VAR_cf_user: ${{ secrets.CF_USER }}


lint-sandbox:
runs-on: ubuntu-latest
name: Lint sandbox
steps:
- uses: actions/checkout@v4

- name: terraform validate
uses: dflook/terraform-validate@v1
with:
path: sandbox-deploy

- name: terraform fmt
uses: dflook/terraform-fmt-check@v1
with:
path: sandbox-deploy

0 comments on commit 904c49d

Please sign in to comment.