-
Notifications
You must be signed in to change notification settings - Fork 210
78 lines (66 loc) · 1.74 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
77
78
name: Lint
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
env:
GO_VERSION: "1.23"
jobs:
go-lint:
name: "Lint Go"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache: true
- name: golangci-lint
uses: golangci/[email protected]
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.61.0
args: --timeout=10m
markdown-lint:
name: "Lint Markdown"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DavidAnson/markdownlint-cli2-action@v17
with:
config: .markdownlint.yaml
globs: |
**/*.md
!**/test/**/*
ui-lint:
name: "Lint UI"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "18"
cache: "npm"
cache-dependency-path: ui/package-lock.json
- name: Lint
run: |
npm ci
npm run lint
working-directory: ui
go-mod-tidy:
name: "Go Mod Tidy"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
check-latest: true
cache: true
- name: Run go mod tidy.
run: go mod tidy
- name: Ensure clean git state.
run: git diff-index --quiet HEAD -- || (echo "Please run 'go mod tidy' and commit changes." && exit 1)