Skip to content

ci: fix red test job (provide DATABASE_URL) - #38

Merged
Pinstack merged 2 commits into
mainfrom
ci-fix-database-url
Jul 15, 2026
Merged

ci: fix red test job (provide DATABASE_URL)#38
Pinstack merged 2 commits into
mainfrom
ci-fix-database-url

Conversation

@Pinstack

Copy link
Copy Markdown
Owner

CI's test job has been red since Oct 2025: the app instantiates Settings() (which requires DATABASE_URL: PostgresDsn) at import, and ci.yml set no DATABASE_URL, so pytest errored at collection (database_url Field required, 0 items).

Fix: set a valid dummy DATABASE_URL for the Run tests step. The suite is fully mocked (the only DB-touching test uses DummyPersister/DummyInspector and never opens a connection), so no live Postgres is needed. Verified locally by hiding .env and running with only the env var: Settings() imports and 96 tests pass.

A postgres/postgis service can be added when tests exercise a live DB.

🤖 Generated with Claude Code

The app instantiates Settings() (which requires DATABASE_URL: PostgresDsn) at
import time, so with no DATABASE_URL the CI test job errored at collection
("database_url Field required", 0 items collected) — red since Oct 2025. The
suite is fully mocked and opens no real connection, so a valid dummy DSN is
enough. A postgres/postgis service can be added later if tests exercise a live DB.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@cursor

cursor Bot commented Jul 15, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

Typer/Rich colourises option names in CI (FORCE_COLOR), rendering '--bbox' as
'\x1b[..m-\x1b[0m\x1b[..m-bbox\x1b[0m', so the literal substring check failed
there while passing in a plain local terminal. Strip ANSI before matching.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Pinstack
Pinstack merged commit fd4d36b into main Jul 15, 2026
2 checks passed
@Pinstack
Pinstack deleted the ci-fix-database-url branch July 15, 2026 13:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant