-
Notifications
You must be signed in to change notification settings - Fork 38
35 lines (35 loc) · 967 Bytes
/
lint.yaml
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
on:
push:
branches: [main]
pull_request:
branches: ['*']
concurrency:
cancel-in-progress: true
group: linter-${{ github.ref }}
name: golangci-lint
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: '1.21.5'
- uses: actions/checkout@v3
- uses: actions/cache@v2
with:
path: |
~/go/pkg/mod
~/.cache/go-build
~/Library/Caches/go-build
~\AppData\Local\go-build
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Run Go linter
uses: golangci/golangci-lint-action@v3
with:
# Since we use actions/cache, disable the native caching
# https://github.com/golangci/golangci-lint-action/issues/244
skip-pkg-cache: true
skip-build-cache: true
args: --timeout=10m