-
-
Notifications
You must be signed in to change notification settings - Fork 1
26 lines (26 loc) · 782 Bytes
/
Copy pathtest.yml
File metadata and controls
26 lines (26 loc) · 782 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
name: Test
on:
push:
branches: [master]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-go@v7
with:
go-version-file: go.mod
- name: Check gofmt
run: test -z "$(gofmt -l .)" || { echo "Run gofmt:"; gofmt -l .; exit 1; }
- name: Check go mod tidy
run: go mod tidy && git diff --exit-code go.mod go.sum
- run: go build ./...
- run: go vet ./...
- run: go test -race ./...
- name: Install staticcheck
run: go install honnef.co/go/tools/cmd/staticcheck@latest
- run: staticcheck ./...
- name: Install govulncheck
run: go install golang.org/x/vuln/cmd/govulncheck@latest
- run: govulncheck ./...