Skip to content

chore: debug caddy

chore: debug caddy #44

name: Terraform Validation and Testing
on:
push:
branches: [ main, feature/* ]
paths:
- '*.tf'
- '*.tfvars'
- '*.tftest.hcl'
- '.terraform-docs.yml'
- '.tflint.hcl'
- '.pre-commit-config.yaml'
- '.github/workflows/terraform-test.yml'
pull_request:
branches: [ main ]
paths:
- '*.tf'
- '*.tfvars'
- '*.tftest.hcl'
- '.terraform-docs.yml'
- '.tflint.hcl'
- '.pre-commit-config.yaml'
workflow_dispatch:
jobs:
terraform-checks:
name: Terraform Checks & Validation
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup environment
uses: ./.github/actions/setup-nix-shell
with:
prepare_terraform: true
- name: Run pre-commit hooks
run: pre-commit run --all-files --show-diff-on-failure
- name: Terraform Init
run: terraform init -backend=false
- name: Terraform Validate
run: terraform validate
# TODO: creating a subccription and a service principal for testing
# terraform-test:
# name: Terraform Test Suite
# runs-on: ubuntu-latest
# needs: terraform-checks
# permissions:
# contents: read
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Setup environment
# uses: ./.github/actions/setup-nix-shell
# with:
# prepare_terraform: true
# - name: Terraform Init
# run: terraform init -backend=false
# - name: Terraform Test
# run: terraform test