The mint seam takes a grant, not two callables #839
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: On Pull Request Backend | |
| on: | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - ".dockerignore" | |
| - ".github/workflows/on-pull-request-backend.yml" | |
| - "backend/**" | |
| - "pyproject.toml" | |
| - "uv.lock" | |
| concurrency: | |
| group: on-pull-request-backend-${{ github.event.pull_request.number }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| checks: | |
| runs-on: ubuntu-latest | |
| # A hung await stalls forever, not loudly; the whole job normally takes | |
| # ~3 minutes. Pairs with pytest's faulthandler below: the dump names the | |
| # frame, this timeout does the killing. | |
| timeout-minutes: 15 | |
| # The suite talks to a real Postgres (the harness runs each test in a rolled-back | |
| # transaction; the durable tests create their own databases) and a real Redis | |
| # (flushed between tests). druks.testing carries its own defaults — the druks_test | |
| # database and Redis index 15, never the application's — so this mirrors local dev | |
| # (deploy/compose.dev.yaml) and needs no env wiring. Images track deploy/compose.yaml. | |
| services: | |
| postgres: | |
| image: postgres:16-alpine@sha256:57c72fd2a128e416c7fcc499958864df5301e940bca0a56f58fddf30ffc07777 | |
| env: | |
| POSTGRES_USER: druks | |
| POSTGRES_PASSWORD: druks | |
| POSTGRES_DB: druks_test | |
| ports: | |
| - 5432:5432 | |
| options: >- | |
| --health-cmd "pg_isready -U druks" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| redis: | |
| image: redis:8.2-alpine@sha256:223b183cbc49f5ff48728e1fc52ccf101f05072decad2bd9867281a3c9bf75fd | |
| ports: | |
| - 6379:6379 | |
| options: >- | |
| --health-cmd "redis-cli ping" | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - uses: astral-sh/setup-uv@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # v7.6.0 | |
| with: | |
| python-version: "3.11" | |
| - run: uv sync --locked --dev | |
| - run: uv run ruff check backend | |
| # The proof extension is a standalone distribution that depends on druks; | |
| # it installs the way an author's would, so druks never depends on it. | |
| - run: uv pip install -e backend/tests/druks-field_notes | |
| # Hang defense is pytest-timeout (pyproject): 180s per test, thread | |
| # method — dump every thread's stack and exit from inside the process, | |
| # so the step ends normally and the log keeps the dump. | |
| - run: uv run pytest backend/ |