-
Notifications
You must be signed in to change notification settings - Fork 1.5k
47 lines (43 loc) · 1.17 KB
/
lint.yml
File metadata and controls
47 lines (43 loc) · 1.17 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
name: Lint
on:
# Enable manually triggering this workflow via the API or web UI
workflow_dispatch:
pull_request:
defaults:
run:
shell: bash
permissions:
contents: read
jobs:
deps:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
fetch-depth: 0
- name: Install Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417 # v6
with:
go-version: 1.25.x
check-latest: true
- name: Check dependencies
run: |
go version
test -z "$(go mod tidy && go mod vendor && git status --porcelain)"
go mod verify
- name: Check code generation
run: |
make generate
test -z "$(git status --porcelain | tee >(cat 1>&2))"
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
fetch-depth: 0
- name: Run linters
uses: ./.github/actions/lint/