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>
This commit is contained in:
juancwu 2026-04-26 23:54:51 +00:00
commit ea3a6ae8c4

View file

@ -12,12 +12,12 @@ tasks:
- go install github.com/mfridman/tparse@latest - go install github.com/mfridman/tparse@latest
build: build:
desc: Build all packages desc: Build all packages (library, middleware, CLIs)
cmds: cmds:
- go build ./... - go build ./...
test: test:
desc: Run unit tests with prettier output via tparse desc: Run unit tests with prettier output via tparse (integration tests skip when AUTHKIT_TEST_DATABASE_URL is unset)
cmds: cmds:
- set -o pipefail && go test ./... -json -cover | tparse -all - set -o pipefail && go test ./... -json -cover | tparse -all
@ -27,9 +27,14 @@ tasks:
- set -o pipefail && go test ./... -race -json | tparse -all - set -o pipefail && go test ./... -race -json | tparse -all
test:integration: test:integration:
desc: Run sqlstore integration tests against a real Postgres (requires AUTHKIT_TEST_DATABASE_URL) desc: Run integration tests against real Postgres (requires AUTHKIT_TEST_DATABASE_URL)
cmds: cmds:
- set -o pipefail && go test ./sqlstore/... -run Integration -count=1 -json | tparse -all - 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: vet:
desc: Run go vet desc: Run go vet
@ -51,3 +56,8 @@ tasks:
cmds: cmds:
- task: vet - task: vet
- task: test - task: test
cli:install:
desc: Install the seeding CLIs (perms / roles / abilities) into $GOBIN
cmds:
- go install ./cmd/perms ./cmd/roles ./cmd/abilities