Skip to content

release v0.4.0

release v0.4.0 #1

Workflow file for this run

name: Test
on:
push:
pull_request:
permissions:
contents: read
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Verify modules
run: go mod verify
- name: Vet
run: go vet ./...
- name: Test with race detector and coverage
run: go test -race -covermode=atomic -coverprofile=coverage.out ./...
- name: Enforce coverage threshold
shell: bash
run: |
coverage="$(go tool cover -func=coverage.out | awk '/^total:/ {gsub("%", "", $3); print $3}')"
echo "Total coverage: ${coverage}%"
awk -v coverage="${coverage}" 'BEGIN { if (coverage + 0 < 85) exit 1 }'