-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 926 Bytes
/
Copy pathci.yml
File metadata and controls
44 lines (37 loc) · 926 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
validate:
name: Validate (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version: "1.26.x"
- name: gofmt
if: matrix.os == 'ubuntu-latest'
run: |
files=$(gofmt -l .)
if [ -n "$files" ]; then
echo "gofmt needed on:"
echo "$files"
exit 1
fi
- name: go vet
run: go vet ./...
- name: go test
run: go test -race -v -count=1 ./...
- name: govulncheck
if: matrix.os == 'ubuntu-latest'
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...