fix(build): make formatting and CI converge (#901)

This commit is contained in:
sam authored and GitHub committed 2026-09-20 00:38:51 +10:00
1 parent 301ced4dc0
commit 2935010504
9 files changed
+164 -53

No files matched your search

+7 -7
View File
@@ -64,12 +64,10 @@ jobs:
with:
node-version: "22"
# Pinned, not @latest: this gate rewrites formatting with the standalone
# gofumpt, and the agent image that gates PRs re-checks it with the
# gofumpt bundled in its golangci-lint. Those two versions must agree
# (see Dockerfile), or a PR passes here and fails there unfixably.
- name: Install gofumpt
run: go install mvdan.cc/gofumpt@v0.11.0
- name: Install quality tools
run: |
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.2
go install mvdan.cc/gofumpt@v0.11.0
- name: Install protobuf tools
run: bash tools/proto.sh install
@@ -85,11 +83,13 @@ jobs:
- name: Quality gate
run: |
gofumpt -w .
go fix ./...
golangci-lint fmt
git diff --exit-code
bash tools/proto.sh lint
bash tools/proto.sh check
go vet ./...
golangci-lint run ./...
go build ./...
go test ./... -count=1
+51
View File
@@ -0,0 +1,51 @@
name: Quality
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
concurrency:
group: quality-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: actions/setup-node@v4
with:
node-version: "24"
cache: npm
cache-dependency-path: ui/package-lock.json
- name: Install quality tools
run: |
go install github.com/go-task/task/v3/cmd/task@v3.48.0
go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.13.2
go install mvdan.cc/gofumpt@v0.11.0
bash tools/proto.sh install
sudo apt-get update
sudo apt-get install -y --no-install-recommends ripgrep
- name: Ensure contract baseline ref
run: |
if ! git show-ref --verify --quiet refs/heads/main; then
git branch main origin/main
fi
- name: Run definitive gate
run: |
task check
git diff --exit-code