Skip to content

Add workflow

Add workflow #1

Workflow file for this run

name: Test
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
name: Go ${{ matrix.go }}
strategy:
matrix:
go:
- '1.24'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Install tools
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
go install golang.org/x/vuln/cmd/govulncheck@latest
- name: StaticCheck
run: staticcheck ./...
- name: GoVulnCheck
run: govulncheck ./...
- name: Vet
run: go vet ./...
- name: Build
run: go build -v ./...
- name: Test
run: |
go test -v -race -coverprofile=coverage.out -covermode=atomic ./...
echo "Coverage: $(go tool cover -func=coverage.out | grep total | awk '{print $3}')"