Skip to content

Commit 309a6d9

Browse files
committed
ci/gha: add go-fix job
Add a CI job to ensure go fix produces no result. Quoting `go doc cmd/fix`: > Fix finds Go programs that use old APIs and rewrites them to use newer > ones. After you update to a new Go release, fix helps make the > necessary changes to your programs. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 81d63f2 commit 309a6d9

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

.github/workflows/validate.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,24 @@ jobs:
4747
run: |
4848
golangci-lint run --config .golangci-extra.yml --new-from-rev=HEAD~1
4949
50+
go-fix:
51+
runs-on: ubuntu-24.04
52+
steps:
53+
- uses: actions/checkout@v4
54+
with:
55+
fetch-depth: 2
56+
- uses: actions/setup-go@v5
57+
with:
58+
go-version: "${{ env.GO_VERSION }}"
59+
- name: install deps
60+
run: |
61+
sudo apt -q update
62+
sudo apt -qy install libseccomp-dev
63+
- name: run go fix
64+
run: |
65+
go fix ./...
66+
git diff --exit-code
67+
5068
compile-buildtags:
5169
runs-on: ubuntu-24.04
5270
env:

0 commit comments

Comments
 (0)