From ea3a6ae8c4a162c427ba07bbfa441fb37da45a9e Mon Sep 17 00:00:00 2001 From: juancwu Date: Sun, 26 Apr 2026 23:54:51 +0000 Subject: [PATCH] Update Taskfile for v1 layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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) --- Taskfile.yml | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/Taskfile.yml b/Taskfile.yml index b659f73..9a149c7 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -12,12 +12,12 @@ tasks: - go install github.com/mfridman/tparse@latest build: - desc: Build all packages + desc: Build all packages (library, middleware, CLIs) cmds: - go build ./... 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: - set -o pipefail && go test ./... -json -cover | tparse -all @@ -27,9 +27,14 @@ tasks: - set -o pipefail && go test ./... -race -json | tparse -all 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: - - 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: desc: Run go vet @@ -51,3 +56,8 @@ tasks: 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