authkit/Taskfile.yml
juancwu ea3a6ae8c4 Update Taskfile for v1 layout
test:integration no longer points at ./sqlstore/... (gone) — runs against
the whole module filtered by TestIntegration_*. Add fuzz:slug for the
slug-validation fuzz target and cli:install for the three seeding CLIs.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 23:54:51 +00:00

63 lines
1.5 KiB
YAML

version: '3'
tasks:
default:
desc: Run vet and unit tests
cmds:
- task: check
install:tools:
desc: Install development tools (tparse for prettier test output)
cmds:
- go install github.com/mfridman/tparse@latest
build:
desc: Build all packages (library, middleware, CLIs)
cmds:
- go build ./...
test:
desc: Run unit tests with prettier output via tparse (integration tests skip when AUTHKIT_TEST_DATABASE_URL is unset)
cmds:
- set -o pipefail && go test ./... -json -cover | tparse -all
test:race:
desc: Run unit tests under the race detector
cmds:
- set -o pipefail && go test ./... -race -json | tparse -all
test:integration:
desc: Run integration tests against real Postgres (requires AUTHKIT_TEST_DATABASE_URL)
cmds:
- set -o pipefail && go test ./... -run '^TestIntegration_' -count=1 -json | tparse -all
fuzz:slug:
desc: Fuzz slug validation for ~30s
cmds:
- go test -run '^$' -fuzz '^FuzzValidateSlug$' -fuzztime=30s .
vet:
desc: Run go vet
cmds:
- go vet ./...
fmt:
desc: Format Go source files
cmds:
- gofmt -w .
tidy:
desc: Tidy go.mod
cmds:
- go mod tidy
check:
desc: Run vet and unit tests
cmds:
- task: vet
- task: test
cli:install:
desc: Install the seeding CLIs (perms / roles / abilities) into $GOBIN
cmds:
- go install ./cmd/perms ./cmd/roles ./cmd/abilities