chore: update test commands

This commit is contained in:
juancwu 2026-04-06 18:04:29 +00:00
commit 7b2002b7c8

View file

@ -25,21 +25,18 @@ tasks:
cmds: cmds:
- echo "Starting app..." - echo "Starting app..."
- task --parallel tailwind-watch templ - task --parallel tailwind-watch templ
# Testing # Testing
test: test:
desc: Run tests (SQLite only) desc: Run tests (SQLite only)
cmds: cmds:
- go test ./internal/... -v -count=1 - set -o pipefail && go test ./... -json | tparse -all
test:integration: test:integration:
desc: Run tests against both SQLite and PostgreSQL desc: Run tests against both SQLite and PostgreSQL
cmds: cmds:
- docker run --name budgit-test-pg -d -p 5433:5432 -e POSTGRES_USER=budgit_test -e POSTGRES_PASSWORD=testpass -e POSTGRES_DB=budgit_test postgres:16-alpine - docker run --name budgit-test-pg -d -p 5433:5432 -e POSTGRES_USER=budgit_test -e POSTGRES_PASSWORD=testpass -e POSTGRES_DB=budgit_test postgres:16-alpine
- defer: docker rm -f budgit-test-pg - defer: docker rm -f budgit-test-pg
- cmd: sleep 3 - cmd: sleep 3
- cmd: BUDGIT_TEST_POSTGRES_URL="postgres://budgit_test:testpass@localhost:5433/budgit_test?sslmode=disable" go test ./internal/... -v -count=1 - cmd: BUDGIT_TEST_POSTGRES_URL="postgres://budgit_test:testpass@localhost:5433/budgit_test?sslmode=disable" set -o pipefail && go test ./... -json | tparse -all
# Production build # Production build
build: build:
desc: Build production binary desc: Build production binary