Isolate CI/deploy tests from host/prod DATABASE_URL.
CI / test (pull_request) Successful in 3s
Unit Tests / test (pull_request) Successful in 3s

Compose was interpolating ${DATABASE_URL} from the Act runner, so containerized tests could hit shared Postgres. Use COMPOSE_DATABASE_URL, an ephemeral compose project with down -v, and clear DB env in unit-test workflows.
This commit is contained in:
2026-07-14 06:55:30 -05:00
parent b3fa2272c8
commit 629d337380
5 changed files with 29 additions and 6 deletions
+3
View File
@@ -25,5 +25,8 @@ jobs:
env:
DJANGO_ENV: dev
DJANGO_SECRET_KEY: test-secret-key
# Explicitly clear DB vars so host/prod DATABASE_URL cannot leak in.
DATABASE_URL: ""
DB_HOST: ""
run: |
uv run python manage.py test