Skip to content

CICD-068 · Test against a disposable PostgreSQL ​

Encyclopedia · Python CI and uv · All snippets

Previous · CICD-067 · Next · CICD-069

1. Where it fits ​

  • Placement Bash run step following checkout, or equivalent lab terminal.
  • Prerequisites uv or Python dependencies pinned with fixture application and tests.
  • Platforms local-linux, github-actions, gitea-actions.

2. Copy the snippet ​

bash
docker compose up -d --wait db
uv run --locked pytest -q tests/integration

3. How it works ​

Compose starts a test database and waits on its health state. The integration process still needs a DSN for the correct disposable instance.

4. Verify the result ​

Set an isolated compose project and DSN before running. Teardown even after failure.

Validation syntax-validated (Bash parse). Status definitions.