Isolate CI/deploy tests from host/prod DATABASE_URL.
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user