YAML · 1618 bytes Raw Blame History
1 name: ci
2 on:
3 push:
4 branches: [trunk, main]
5 pull_request:
6
7 permissions:
8 contents: read
9
10 # GH Actions is migrating its built-in Node from 20 to 24 by 2026-09-16.
11 # This flag forces our pinned action versions (checkout@v4, setup-go@v5,
12 # golangci-lint@v8) to use Node 24 today, which silences the deprecation
13 # warning and removes the cliff-edge break when the runner default flips.
14 # Drop this once we bump every action past its Node-24-native release.
15 env:
16 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true"
17
18 jobs:
19 ci:
20 runs-on: ubuntu-latest
21 steps:
22 - uses: actions/checkout@v4
23
24 - uses: actions/setup-go@v5
25 with:
26 # Read the target Go version straight from go.mod so this
27 # workflow doesn't drift from the module on every Go bump.
28 go-version-file: go.mod
29 cache: true
30
31 - name: Install golangci-lint
32 # v8 of the action ships with golangci-lint v2 by default,
33 # which is required to parse our .golangci.yml (version: "2")
34 # and is built with a Go new enough to load the module.
35 uses: golangci/golangci-lint-action@v8
36 with:
37 version: latest
38 args: --timeout=5m
39
40 - name: Lint — unused (no var-_-equals-symbol shims)
41 # Block the dead-code 'silence unused import' shims that
42 # accumulated during S00–S40 refactors (audit 2026-05-10 M1).
43 run: scripts/lint-unused.sh
44
45 - name: Lint - migration versions
46 run: scripts/lint-migration-versions.sh
47
48 - name: Test
49 run: go test -trimpath ./...
50
51 - name: Build
52 run: make build
53