-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (59 loc) · 1.63 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
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
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: setup go
uses: ./.github/actions/setup-go/
- 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
runs-on: ubuntu-latest-4-cores
steps:
- uses: actions/checkout@v4
- name: setup go
uses: ./.github/actions/setup-go/
- 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: ./.github/actions/setup-go/
- 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@v3
with:
version: v1.54.2
args: --verbose