Skip to content

test

test #17

Workflow file for this run

name: Tests
on: [push]
defaults:
run:
shell: sh
jobs:
fmt:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- directory: ./test_dir/project1
terraform_version: 0.15.0
- directory: ./test_dir/project2
terraform_version: 1.3.3
- directory: ./test_dir/project3/applications/backend-app
terraform_version: 1.2.1
- directory: ./test_dir/project3/applications/frontend-app
terraform_version: 1.4.1
- directory: ./test_dir/project4
terraform_version: 1.6.1
defaults:
run:
working-directory: ${{ matrix.directory }}
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform_version }}
- run: ./install.sh
working-directory: ${{ github.workspace }}
- run: tfam fmt -recursive -check
init:
needs: [fmt]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- directory: ./test_dir/project1
terraform_version: 0.15.0
- directory: ./test_dir/project2
terraform_version: 1.3.3
- directory: ./test_dir/project3/applications/backend-app
terraform_version: 1.2.1
- directory: ./test_dir/project3/applications/frontend-app
terraform_version: 1.4.1
- directory: ./test_dir/project4
terraform_version: 1.6.1
defaults:
run:
working-directory: ${{ matrix.directory }}
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform_version }}
- run: ./install.sh
working-directory: ${{ github.workspace }}
- run: tfam init -no-color
validate:
needs: [init]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- directory: ./test_dir/project1
terraform_version: 0.15.0
- directory: ./test_dir/project2
terraform_version: 1.3.3
- directory: ./test_dir/project3/applications/backend-app
terraform_version: 1.2.1
- directory: ./test_dir/project3/applications/frontend-app
terraform_version: 1.4.1
- directory: ./test_dir/project4
terraform_version: 1.6.1
defaults:
run:
working-directory: ${{ matrix.directory }}
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform_version }}
- run: ./install.sh
working-directory: ${{ github.workspace }}
- run: tfam init -no-color
- run: tfam validate -no-color
plan:
needs: [validate]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- directory: ./test_dir/project1
terraform_version: 0.15.0
- directory: ./test_dir/project2
terraform_version: 1.3.3
- directory: ./test_dir/project3/applications/backend-app
terraform_version: 1.2.1
- directory: ./test_dir/project3/applications/frontend-app
terraform_version: 1.4.1
- directory: ./test_dir/project4
terraform_version: 1.6.1
defaults:
run:
working-directory: ${{ matrix.directory }}
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: ${{ matrix.terraform_version }}
- run: ./install.sh
working-directory: ${{ github.workspace }}
- run: tfam init -no-color
- run: tfam plan -no-color
cli:
needs: [plan]
runs-on: ubuntu-latest
strategy:
matrix:
cmd:
- apply -auto-approve
- apply -compact-warnings
- apply -destroy
- apply -input=false
- apply -lock
- apply -no-color
- apply -parallelism=3
- apply -refresh=true
- console
- fmt -check=true
- fmt -diff
- fmt -list=true
- fmt -write=false
- get -update=true
- get -upgrade=true
- graph -draw-cycles
- import -no-color
- init -get
- init -get-plugins
- init -lock
- init -upgrade
- init -verify-plugins=true
- output -json
- output -no-color
- plan -compact-warnings
- plan -destroy
- plan -detailed-exitcode
- plan -input=false
- plan -lock
- plan -no-color
- plan -out=output.json
- plan -parallelism=15
- plan -refresh=true
- providers -json
- providers -no-color
- refresh -compact-warnings
- refresh -lock
- refresh -no-color
- show -json
- show -no-color
- state -no-color
- taint -allow-missing
- taint -lock
- taint -no-color
- test -json
- test -no-color
- untaint -allow-missing
- untaint -lock
- untaint -no-color
- validate -json
- validate -no-color
- version
defaults:
run:
working-directory: ./test_dir/project4
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v2
with:
terraform_version: 1.6.1
- run: ./install.sh
working-directory: ${{ github.workspace }}
- run: tfam init -no-color
- run: tfam ${{ matrix.cmd }}