Skip to content

test

test #6

Workflow file for this run

name: Tests
on: [push]
jobs:
fmt:
runs-on: ubuntu-latest
strategy:
matrix:
directory:
- ./test_dir/project1
- ./test_dir/project2
- ./test_dir/project3
- ./test_dir/project4
defaults:
run:
working-directory: ${{ matrix.directory }}
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v2
- run: terraform fmt -recursive -check
init:
needs: [fmt]
runs-on: ubuntu-latest
strategy:
matrix:
directory:
- ./test_dir/project1
- ./test_dir/project2
- ./test_dir/project3
- ./test_dir/project4
defaults:
run:
working-directory: ${{ matrix.directory }}
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v2
- run: terraform init -no-color
validate:
needs: [init]
runs-on: ubuntu-latest
strategy:
matrix:
directory:
- ./test_dir/project1
- ./test_dir/project2
- ./test_dir/project3
- ./test_dir/project4
defaults:
run:
working-directory: ${{ matrix.directory }}
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v2
- run: terraform init -no-color
- run: terraform validate -no-color
plan:
needs: [validate]
runs-on: ubuntu-latest
strategy:
matrix:
directory:
- ./test_dir/project1
- ./test_dir/project2
- ./test_dir/project3
- ./test_dir/project4
defaults:
run:
working-directory: ${{ matrix.directory }}
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v2
- run: terraform init -no-color
- run: terraform plan -no-color