-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1008 Bytes
/
Copy pathci.yml
File metadata and controls
50 lines (39 loc) · 1008 Bytes
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
name: CI
on:
push:
branches: [main]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Check Go code is modernized
run: make check-go-fix
- name: Build
run: make build-all
- name: Test
run: go test -race -timeout 2m ./...
- name: Lint
uses: golangci/golangci-lint-action@v9
with:
version: v2.12
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
- name: Generate docs
run: make docs
- name: Check docs are up to date
run: |
if [ -n "$(git status --porcelain docs/)" ]; then
echo "Docs are out of date. Run 'make docs' and commit the result."
git status --porcelain docs/
exit 1
fi