ci: add test workflow with race detector and staticcheck

This commit is contained in:
2026-03-02 00:09:51 +00:00
parent 91b69246fa
commit e5f7cc7fae

22
.github/workflows/test.yml vendored Normal file
View File

@@ -0,0 +1,22 @@
name: test
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ["1.24", "1.26"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- run: go test -race -count=1 ./...
- run: go vet ./...
- run: go install honnef.co/go/tools/cmd/staticcheck@latest && staticcheck ./...