Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ name: backend
on:
push:
branches: [main]
paths: ["backend/**", ".github/workflows/backend.yml"]
# The tests build their database from the role scripts in infra/compose/postgres/initdb (tests/conftest.py)
paths: ["backend/**", "infra/compose/postgres/initdb/**", ".github/workflows/backend.yml"]
pull_request:
paths: ["backend/**", ".github/workflows/backend.yml"]
paths: ["backend/**", "infra/compose/postgres/initdb/**", ".github/workflows/backend.yml"]

concurrency:
group: backend-${{ github.ref }}
Expand All @@ -17,7 +18,8 @@ permissions:
jobs:
checks:
runs-on: ubuntu-24.04
timeout-minutes: 15
# 4,120 tests on 4 workers take about 7.5 minutes on a 4-CPU machine; this leaves room for a slower runner
timeout-minutes: 30
defaults:
run:
working-directory: backend
Expand Down
5 changes: 4 additions & 1 deletion backend/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@ uv run ruff check .
uv run ruff format --check .
uv run mypy
uv run lint-imports
uv run pytest "$@"
# Four workers, each with its own PostgreSQL, Redis and object store containers (the session fixtures run
# once per worker). The suite waits on the databases far more than on the CPU, so this fits the 4-vCPU CI
# runner and a 4-CPU Colima. Pass -n 0 to run serially.
uv run pytest -n 4 "$@"
1 change: 1 addition & 0 deletions backend/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ dev = [
"pytest>=9.1.1",
"pytest-asyncio>=1.4.0",
"pytest-cov>=7.1.0",
"pytest-xdist>=3.8",
"ruff>=0.16.9",
"testcontainers[postgres,redis]>=4.15.0",
"types-aiobotocore[s3]>=3.9.1",
Expand Down
206 changes: 115 additions & 91 deletions backend/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading