-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (36 loc) · 1 KB
/
Copy pathci.yml
File metadata and controls
39 lines (36 loc) · 1 KB
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
name: CI
on:
pull_request: {}
push:
branches: [main, master]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: go build ./...
- name: Vet
run: go vet ./...
- name: gofmt
run: |
test -z "$(gofmt -l .)" || { gofmt -l .; echo 'gofmt: files need formatting'; exit 1; }
- name: Test
run: go test ./... -race
# Advisory lint job — non-blocking. The 20-task codebase predates golangci-lint
# and was gated on gofmt/vet/test-race; lint runs as advice so it surfaces
# suggestions without blocking merges on pre-existing findings.
lint:
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
- uses: golangci/golangci-lint-action@v6
with:
args: --timeout=5m