fast back
This commit is contained in:
parent
d6f955d2d9
commit
73a45b81cc
4 changed files with 287 additions and 11 deletions
7
Makefile
7
Makefile
|
|
@ -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),)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue