-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (62 loc) · 1.77 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: 🤓 Lint
on:
push:
branches: [ "main" ]
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
generate:
name: Generated files up to date
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with: { go-version-file: 'go.mod'}
- name: Make sure generated files are up to date
run: |
make generate
git diff --no-patch --exit-code
if [ $? -ne 0 ]; then
echo "Please run make generate and commit the changes."
exit 1
fi
lint-manifest:
name: Manifests up to date
runs-on: ubuntu-latest-4-cores
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with: { go-version-file: 'go.mod'}
- name: Make sure manifest are up to date
run: |
make manifests
git diff --no-patch --exit-code
if [ $? -ne 0 ]; then
echo "Please run make manifests and commit the changes."
exit 1
fi
lint-go:
name: Go code
runs-on: ubuntu-latest-4-cores
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with: { go-version-file: 'go.mod'}
- name: Make sure go.mod and go.sum are up to date
run: |
go mod tidy
git diff --no-patch --exit-code go.mod go.sum
if [ $? -ne 0 ]; then
echo "Please run go mod tidy and commit the changes."
exit 1
fi
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.62.0
args: --verbose