-
-
Notifications
You must be signed in to change notification settings - Fork 888
37 lines (33 loc) · 979 Bytes
/
staticcheck.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: 'staticcheck'
on:
pull_request:
paths: ['**.go', 'go.mod', '.github/workflows/*']
push:
branches: ['main', 'aix']
jobs:
staticcheck:
name: 'staticcheck'
runs-on: ubuntu-latest
steps:
- id: install_go
uses: WillAbides/setup-go-faster@v1.7.0
with:
go-version: "1.19.x"
- uses: actions/cache@v3
with:
key: ${{ runner.os }}-staticcheck
path: |
${{ runner.temp }}/staticcheck
${{ steps.install_go.outputs.GOCACHE || '' }}
- run: |
export STATICCHECK_CACHE="${{ runner.temp }}/staticcheck"
go install honnef.co/go/tools/cmd/staticcheck@latest
$(go env GOPATH)/bin/staticcheck -matrix <<EOF
windows: GOOS=windows
linux: GOOS=linux
freebsd: GOOS=freebsd
openbsd: GOOS=openbsd
netbsd: GOOS=netbsd
darwin: GOOS=darwin
illumos: GOOS=illumos
EOF