-
Notifications
You must be signed in to change notification settings - Fork 7
44 lines (36 loc) · 869 Bytes
/
lint.yml
File metadata and controls
44 lines (36 loc) · 869 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
41
42
43
44
name: Lint
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
golangci:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.26'
- name: golangci-lint
uses: golangci/golangci-lint-action@v7
with:
version: v2.11.3
args: --timeout=10m --config=.golangci.yml
verify: false
- name: Run go fmt
run: |
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
echo "Please run 'go fmt ./...'"
gofmt -s -l .
exit 1
fi
- name: Run go vet
run: go vet ./...
- name: Run staticcheck
uses: dominikh/staticcheck-action@v1.3.0
with:
version: "latest"
install-go: false