-
Notifications
You must be signed in to change notification settings - Fork 83
76 lines (76 loc) · 2.26 KB
/
lint.yml
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
75
76
name: lint
on:
push:
branches:
- master
- release-*
pull_request:
workflow_dispatch:
env:
GOLANGCI_LINT_VERSION: v1.60.3
jobs:
golangci:
name: golangci-lint
concurrency:
group: lint-golangci-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=5m
golangci-examples:
name: golangci-lint-examples
concurrency:
group: lint-golangci-examples-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: generate examples golangci-lint config
run: ./.github/scripts/golangci-lint-gen-configs.sh
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=5m
working-directory: examples
golangci-slo:
name: golangci-lint-slo
concurrency:
group: lint-golangci-slo-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: generate slo golangci-lint config
run: ./.github/scripts/golangci-lint-gen-configs.sh
- name: golangci-lint
uses: golangci/golangci-lint-action@v4
with:
version: ${{ env.GOLANGCI_LINT_VERSION }}
args: --timeout=5m
working-directory: tests/slo
autoformatter:
name: autoformat check
concurrency:
group: lint-autoformat-${{ github.ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: "1.23.x"
- name: Install utilities
run: |
go install mvdan.cc/[email protected]
go install github.com/daixiang0/[email protected]
- name: format all files with auto-formatter
run: bash ./.github/scripts/format-all-go-code.sh "$PWD"
- name: Check repository diff
run: bash ./.github/scripts/check-work-copy-equals-to-committed.sh "auto-format broken"