-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (36 loc) · 979 Bytes
/
lint.yml
File metadata and controls
40 lines (36 loc) · 979 Bytes
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
38
39
40
name: lint
on: [push, pull_request]
jobs:
run:
strategy:
fail-fast: false
matrix:
go: ["1.21.x" ]
runs-on: ubuntu-latest
name: "Lint (Go ${{matrix.go}})"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
check-latest: true
- name: Check that go.mod is tidied
run: |
cp go.mod /tmp/go.mod.orig
cp go.sum /tmp/go.sum.orig
go mod tidy
diff go.mod /tmp/go.mod.orig
diff go.sum /tmp/go.sum.orig
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.56.2
args: -v
skip-pkg-cache: true
- name: go vet
run: |
go vet -tags 'test' ./...
- name: staticcheck
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
staticcheck -tags 'test redis' ./...