-
Notifications
You must be signed in to change notification settings - Fork 14
51 lines (45 loc) · 1.3 KB
/
golangci-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
51
name: golangci-lint
on:
push:
branches: [master]
pull_request:
permissions:
contents: read
# Optional: allow read access to pull request. Use with `only-new-issues` option.
pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- name: Cache Go Modules
uses: actions/cache@v3
with:
path: |
~/.cache/go-build # ubuntu-latest
~/Library/Caches/go-build # macos-latest
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: "1.22"
- name: Setup Protoc
uses: arduino/[email protected]
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Run Make
run: make
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
skip-pkg-cache: true
skip-build-cache: true
args: --timeout 5m --disable errcheck
# Optional: show only new issues if it's a pull request. The default value is `false`.
only-new-issues: true