Skip to content

release: v0.1.2 (#7) #29

release: v0.1.2 (#7)

release: v0.1.2 (#7) #29

Workflow file for this run

name: ci
on:
push:
branches: [main, dev]
pull_request:
branches: [main, dev]
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: gofmt drift
run: |
unformatted="$(gofmt -l .)"
if [ -n "$unformatted" ]; then
echo "::error::files need gofmt:"
echo "$unformatted"
exit 1
fi
- name: golangci-lint
uses: golangci/golangci-lint-action@v9
with:
version: latest
tidy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: go mod tidy drift
run: |
go mod tidy
git diff --exit-code go.mod go.sum
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: build
run: make build
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: go test -race
run: go test -race ./...
fuzz:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: fuzz (5s per target)
run: ./scripts/fuzz.sh 5s
vuln:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: govulncheck
uses: golang/govulncheck-action@v1