name: ci on: push: branches: [trunk, main] pull_request: permissions: contents: read # GH Actions is migrating its built-in Node from 20 to 24 by 2026-09-16. # This flag forces our pinned action versions (checkout@v4, setup-go@v5, # golangci-lint@v8) to use Node 24 today, which silences the deprecation # warning and removes the cliff-edge break when the runner default flips. # Drop this once we bump every action past its Node-24-native release. env: FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" jobs: ci: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: # Read the target Go version straight from go.mod so this # workflow doesn't drift from the module on every Go bump. go-version-file: go.mod cache: true - name: Install golangci-lint # v8 of the action ships with golangci-lint v2 by default, # which is required to parse our .golangci.yml (version: "2") # and is built with a Go new enough to load the module. uses: golangci/golangci-lint-action@v8 with: version: latest args: --timeout=5m - name: Lint — unused (no var-_-equals-symbol shims) # Block the dead-code 'silence unused import' shims that # accumulated during S00–S40 refactors (audit 2026-05-10 M1). run: scripts/lint-unused.sh - name: Lint - migration versions run: scripts/lint-migration-versions.sh - name: Test run: go test -trimpath ./... - name: Build run: make build