-
Notifications
You must be signed in to change notification settings - Fork 76
49 lines (43 loc) · 1.06 KB
/
lint.yml
File metadata and controls
49 lines (43 loc) · 1.06 KB
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
name: Go lint
on:
push:
branches: &protected_branches
- main
- release-*
paths-ignore: &common_ignores
- 'docs/**'
- 'examples/**'
- '**.md'
- '**.svg'
- '.github/workflows/publish-docs.yml'
- 'mkdocs.yml'
pull_request:
branches: *protected_branches
paths-ignore: *common_ignores
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.12'
- name: Go caches
uses: actions/cache@v4
with:
key: ${{ runner.os }}-lint-go-caches-${{ hashFiles('go.sum') }}
path: |
~/go/pkg/mod
~/.cache/go-build
~/.cache/golangci-lint
- name: Check generated code to be consistent
run: make generate-all && git diff --exit-code
- name: Run linter
env:
GOLANGCI_LINT_FLAGS: --output.text.path=stdout
run: |
make lint