test #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: [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 plan -no-color | |