Skip to content

Commit

Permalink
test: add staticcheck
Browse files Browse the repository at this point in the history
  • Loading branch information
escalate committed Jan 7, 2024
1 parent 0849c19 commit 922e3d8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 922e3d8

Please sign in to comment.