feat(align): canonical terraform block ordering #844
Workflow file for this run
This file contains hidden or 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: Go | |
| on: | |
| push: | |
| branches: ["**"] | |
| tags: ["v*"] | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| go: [stable, oldstable] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| cache: true | |
| - name: Tidy | |
| run: make tidy | |
| - name: Format | |
| run: make fmt | |
| - name: Lint | |
| run: make lint | |
| - name: Comment check | |
| run: make commentcheck | |
| - name: Test (race) | |
| run: make test-race | |
| - name: Cover | |
| run: make cover | |
| - name: Vulnerability check (non-blocking) | |
| continue-on-error: true | |
| run: | | |
| go install golang.org/x/vuln/cmd/govulncheck@latest | |
| govulncheck ./... | |
| - name: Upload release artifacts | |
| if: startsWith(github.ref, 'refs/tags/') | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: hclalign-${{ matrix.os }}-${{ matrix.go }} | |
| path: hclalign | |
| terraform: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: hashicorp/terraform:1.5.7 | |
| continue-on-error: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Verify terraform fmt on golden cases | |
| run: | | |
| set -euo pipefail | |
| for file in $(find tests/cases -type f -name 'out*.tf'); do | |
| echo "Checking $file" | |
| terraform fmt -check -diff "$file" | |
| done |