Skip to content

Merge pull request #224 from oferchen/codex/add-comment-checker-and-t… #842

Merge pull request #224 from oferchen/codex/add-comment-checker-and-t…

Merge pull request #224 from oferchen/codex/add-comment-checker-and-t… #842

Workflow file for this run

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