Skip to content

CI: backend tests on 4 workers, so the job finishes inside its timeout - #28

Merged
jadhavgaurav merged 1 commit into
developfrom
ci/fix-pipeline
Nov 5, 2026
Merged

jadhavgaurav merged 1 commit into
developfrom
ci/fix-pipeline

Conversation

@jadhavgaurav

Copy link
Copy Markdown
Contributor

What

  • backend/check.sh runs pytest -n 4 (adds pytest-xdist as a dev dependency).
  • The backend checks job timeout goes from 15 to 30 minutes.
  • The backend workflow also runs when infra/compose/postgres/initdb/** changes; tests/conftest.py builds the test database from those scripts.

Why

The backend job has never passed: 4,120 tests ran serially, about 45 minutes on CI, and the 15 minute limit cancelled every run. So no image was pushed and the deploy workflow skipped every time.

Proof

  • Full suite locally with pytest -n 4: 4120 passed in 7m27s, coverage 97.55% (gate 90%).
  • ruff, ruff format, mypy, lint-imports, shellcheck, actionlint, infra/test/resolve-release.sh: all pass.
  • Independent review: approved. Each xdist worker gets its own containers; no shared ports or host paths; coverage merges across workers.

The CI run on this PR is the check that matters: it should finish well inside 30 minutes.

… timeout

The backend job ran 4,120 tests one at a time and needed about 45 minutes, so it hit
its 15 minute limit on every run and no image was ever pushed. With pytest-xdist on
4 workers (each with its own PostgreSQL, Redis and object store containers) the full
suite with coverage takes 7.5 minutes on a 4-CPU machine. The job limit goes to 30
minutes for a slower runner.

The workflow also runs when infra/compose/postgres/initdb changes, because the tests
build their database from those role scripts.
@vercel

vercel Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
idraft-preview Ready Ready Preview Nov 5, 2026 10:35am UTC
1 Skipped Deployment
Project Deployment Actions Updated
idraft-site Ignored Ignored Preview Nov 5, 2026 10:35am UTC

Request Review

@jadhavgaurav
jadhavgaurav merged commit 7f3ebb4 into develop Nov 5, 2026
4 of 5 checks passed
@jadhavgaurav
jadhavgaurav deleted the ci/fix-pipeline branch November 5, 2026 10:44
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