From 56f480cba44d14ce1ec54ace193981d1bc8bf9cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Mon, 19 Feb 2024 21:16:59 +0000 Subject: [PATCH] CI: build staticcheck release from source Upstream's latest version works fine when built with Go 1.22, but their release archives are built with 1.21, and that seems to trigger a panic due to issue https://github.com/dominikh/go-tools/issues/1496. Thankfully, building from source is easy enough. It shouldn't cause any noticeable slowdown, since we reuse both the modules and build Go caches via actions/setup-go. --- .github/workflows/main.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 71547960f..68d4e784c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -60,10 +60,12 @@ jobs: curl -L https://github.com/dominikh/go-tools/releases/download/2023.1.6/staticcheck_linux_amd64.tar.gz | tar -xzf - - name: Run staticcheck run: | - ./staticcheck/staticcheck ./... 2> staticcheck/stderr + go install honnef.co/go/tools/cmd/staticcheck@2023.1.6 + staticcheck -debug.version + staticcheck ./... 2> staticcheck-stderr - name: Check staticcheck stderr (this step isn't needed because we are using actions/setup-go@v5 on GitHub hosted runner) run: | - if cat staticcheck/stderr | grep "matched no packages" ; then + if cat staticcheck-stderr | grep "matched no packages" ; then echo "staticcheck step did nothing, due to https://github.com/vocdoni/vocdoni-node/issues/444" echo "Please re-run job." # seize the opportunity to fix the underlying problem: a permissions error in ~/.cache