-
Notifications
You must be signed in to change notification settings - Fork 1
50 lines (43 loc) · 1.11 KB
/
lint.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
38
39
40
41
42
43
44
45
46
47
48
49
50
name: linting
on:
push:
paths:
- "**.go"
- go.mod
- go.sum
branches: ["main"]
pull_request:
paths:
- "**.go"
- go.mod
- go.sum
branches: ["main"]
permissions:
contents: read
pull-requests: read
checks: write
jobs:
lint:
name: "go"
runs-on: ubuntu-latest
steps:
- name: Check out the source code
uses: actions/checkout@v4
- name: Set up Go 1.21
uses: actions/setup-go@v5
with:
go-version: "1.21"
check-latest: true
- name: Verify the dependencies
run: |
go mod verify
go mod download
- name: Lint
uses: golangci/golangci-lint-action@v4
with:
version: v1.57.1
args: --timeout 20m0s --verbose --out-${IGNORE_FUTURE_WARNINGS}format tab
only-new-issues: true # Show only new issues on pull requests
# Disable caching as a workaround for https://github.com/golangci/golangci-lint-action/issues/135.
# The line can be removed once the golangci-lint issue is resolved.
skip-pkg-cache: true