-
Notifications
You must be signed in to change notification settings - Fork 322
55 lines (47 loc) · 2.24 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
# Dispatch to the consul-k8s-workflows when a PR is created and on merges to main/release*
name: lint
on:
pull_request:
jobs:
get-go-version:
uses: ./.github/workflows/reusable-get-go-version.yml
linting:
name: golangci-lint
needs:
- get-go-version
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4.1.4
- name: Setup go
uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7 # v5.0.1
with:
go-version: ${{ needs.get-go-version.outputs.go-version }}
cache: false
- name: Setup GOROOT # Need to set GOROOT because an older version of go-critic used GOROOT to find rules
run: echo "GOROOT=$(go env GOROOT)" >> "${GITHUB_ENV}"
- name: golangci-lint-helm-gen
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
with:
version: "v1.55.2"
working-directory: hack/helm-reference-gen
skip-cache: true # We have seen sticky timeout bugs crop up with caching enabled, so disabling for now
args: "--no-config --disable-all --enable gofmt,govet"
- name: golangci-lint-control-plane
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
with:
version: "v1.55.2"
working-directory: control-plane
skip-cache: true # We have seen sticky timeout bugs crop up with caching enabled, so disabling for now
- name: golangci-lint-acceptance
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
with:
version: "v1.55.2"
working-directory: acceptance
skip-cache: true # We have seen sticky timeout bugs crop up with caching enabled, so disabling for now
- name: golangci-lint-cli
uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64 # v6.0.1
with:
version: "v1.55.2"
working-directory: acceptance
skip-cache: true # We have seen sticky timeout bugs crop up with caching enabled, so disabling for now