-
-
Notifications
You must be signed in to change notification settings - Fork 50
45 lines (37 loc) · 1013 Bytes
/
golint.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
name: Go Linter
on:
push:
paths-ignore:
- 'docs/**'
- 'README.md'
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
- 'README.md'
branches:
- main
permissions:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
env:
GO_VERSION: "1.23"
GOLANGCI_LINT_VERSION: "v1.61.0"
jobs:
linter:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "${{ env.GO_VERSION }}"
# workaround: when the files to be extracted are already present,
# tar extraction in Golangci Lint fails with the "File exists"
# https://github.com/golangci/golangci-lint-action/issues/807
cache: false
- name: golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: "${{ env.GOLANGCI_LINT_VERSION }}"
args: --timeout 3m --verbose