From 309a6d91a43658e5468552d63b10feb6fb251424 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Mon, 1 Jul 2024 10:10:24 -0700 Subject: [PATCH] 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 --- .github/workflows/validate.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index ad4929b2326..2fc53c129dc 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -47,6 +47,24 @@ jobs: run: | golangci-lint run --config .golangci-extra.yml --new-from-rev=HEAD~1 + go-fix: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + - uses: actions/setup-go@v5 + with: + go-version: "${{ env.GO_VERSION }}" + - name: install deps + run: | + sudo apt -q update + sudo apt -qy install libseccomp-dev + - name: run go fix + run: | + go fix ./... + git diff --exit-code + compile-buildtags: runs-on: ubuntu-24.04 env: