-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 976 Bytes
/
ci.yml
File metadata and controls
47 lines (42 loc) · 976 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.24", "1.25", "1.26"]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: ${{ matrix.go-version }}
- name: Download dependencies
run: go get ./...
- name: Run tests
run: go test ./... -v
- name: Build
run: go build ./...
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: "1.25"
- name: Run go vet
run: go vet ./...
- name: Run go fmt
run: |
fmt_output=$(go fmt ./...)
if [ -n "$fmt_output" ]; then
echo "The following files need formatting:"
echo "$fmt_output"
exit 1
fi