-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (31 loc) · 726 Bytes
/
Copy pathlint.yml
File metadata and controls
36 lines (31 loc) · 726 Bytes
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
name: Lint
on:
pull_request:
types: [opened, synchronize, reopened]
branches: [ "main" ]
paths:
- '**.go'
- 'go.mod'
- 'go.sum'
- '.golangci.yml'
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.22'
cache: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=5m
- name: Verify dependencies
run: |
go mod verify
go mod tidy
git diff --exit-code go.mod go.sum || (echo "go.mod or go.sum has changed"; exit 1)