Poindexter/.github/workflows/ci.yml

42 lines
857 B
YAML

name: CI
on:
push:
branches: [ main, master ]
pull_request:
jobs:
build-test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: [ '1.22.x', '1.23.x' ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Verify go.mod is tidy
run: |
go mod tidy
git diff --exit-code -- go.mod go.sum
- name: Build
run: go build ./...
- name: Test (race)
run: go test -race ./...
- name: Vet
run: go vet ./...
- name: Govulncheck
uses: golang/govulncheck-action@v1
with:
go-version-input: ${{ matrix.go-version }}
# Run against packages in the module
args: ./...