fast back

This commit is contained in:
counterweight 2025-12-25 00:33:05 +01:00
parent d6f955d2d9
commit 73a45b81cc
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
4 changed files with 287 additions and 11 deletions

View file

@ -40,6 +40,11 @@ db-ready:
done
@docker compose exec -T db psql -U postgres -tc "SELECT 1 FROM pg_database WHERE datname = 'arbret_test'" | grep -q 1 || \
docker compose exec -T db psql -U postgres -c "CREATE DATABASE arbret_test"
@# Create worker-specific databases for parallel test execution (pytest-xdist)
@for i in 0 1 2 3 4 5 6 7; do \
docker compose exec -T db psql -U postgres -tc "SELECT 1 FROM pg_database WHERE datname = 'arbret_test_gw$$i'" | grep -q 1 || \
docker compose exec -T db psql -U postgres -c "CREATE DATABASE arbret_test_gw$$i"; \
done
@echo "PostgreSQL is ready"
db-seed: db-ready
@ -59,7 +64,7 @@ dev:
TEST ?=
test-backend: db-clean db-ready
cd backend && uv run pytest -v $(TEST)
cd backend && uv run pytest -v -n 8 $(TEST)
test-frontend:
cd frontend && npm run test $(if $(TEST),-- $(TEST),)