feat: move to nix and terraform #193
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: 'Test Terraform' | |
on: | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'terraform/**.hcl' | |
- 'terraform/**.tf' | |
- 'terraform/**.tfvars' | |
- 'terraform/**.tmpl' | |
- .github/workflows/test-terraform.yml | |
permissions: | |
pull-requests: write | |
jobs: | |
tf-test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
dir: [terraform/libvirt, terraform] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: hashicorp/setup-terraform@v2 | |
- name: Terraform Init | |
id: init | |
run: terraform -chdir=${{ matrix.dir }} init | |
- name: Terraform fmt | |
id: fmt | |
run: terraform -chdir=${{ matrix.dir }} fmt -check -diff | |
- name: Terraform Validate | |
id: validate | |
run: terraform -chdir=${{ matrix.dir }} validate -no-color |