From 922e3d8ea255f58128a5bb360a04c59293b2ee26 Mon Sep 17 00:00:00 2001 From: Felix Boerner Date: Sun, 7 Jan 2024 10:32:03 +0100 Subject: [PATCH] test: add staticcheck --- .github/workflows/tests.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 91b0ae1..6bcb66c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -254,3 +254,19 @@ jobs: if: steps.check_go.outputs.files_exists == 'true' run: | go test -v -cover ./... + + - name: Install staticcheck + if: steps.check_go.outputs.files_exists == 'true' + run: | + gh release download --pattern "*linux_amd64.tar.gz" --dir /tmp + tar --extract --gzip --strip-components 1 --file /tmp/staticcheck_linux_amd64.tar.gz --directory /tmp + chmod +x /tmp/staticcheck + mv /tmp/staticcheck /usr/local/bin/staticcheck + env: + GH_REPO: dominikh/go-tools + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + + - name: Run staticcheck + if: steps.check_go.outputs.files_exists == 'true' + run: | + staticcheck