-
Notifications
You must be signed in to change notification settings - Fork 20
57 lines (46 loc) · 1.19 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
name: lint
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/main' && github.run_number || github.ref }}
cancel-in-progress: true
jobs:
build:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
- name: binary-cache
uses: actions/cache@v3
with:
path: ./bin
key: ${{ runner.os }}-${{ hashFiles('./Makefile') }}
- name: format go
run: |
make fmt-go
if !git diff --exit-code; then
echo "Files are not well formatted"
exit 1
fi
- name: check generated files
run: |
make gen-proto
if !git diff --exit-code; then
echo "Generated files are not up-to-date"
exit 1
fi
- name: lint go
run: make lint-go
- name: lint proto
run: make lint-proto
- name: lint spell
run: make lint-spell
- name: lint editorconfig
run: |
# See https://editorconfig.org/ to know how to support editorconfig in your editor
make lint-editorconfig