Files
stack/.gitea/workflows
kert 16d657a8e0
Some checks failed
Deploy / docs (push) Has been skipped
CI / lint (push) Successful in 34s
Deploy / notebooks (push) Has been skipped
Deploy / zotero (push) Has been skipped
Deploy / api (push) Successful in 48s
Deploy / mc (push) Has been skipped
Infra CI / notebooks (push) Failing after 20s
Infra CI / zotero (push) Successful in 12s
Infra CI / docs (push) Successful in 12s
Infra CI / api (push) Successful in 18s
Infra CI / mc (push) Successful in 12s
Package Supply Chain / pkg-supply-chain (push) Failing after 49s
Deploy / report (push) Successful in 18s
CI / test (push) Failing after 11m9s
perf(ci): add -n auto to CI pytest + fix coverage combining (#388)
The earlier xdist attempt was reverted in 847713d because pytest-cov
combined results unreliably under -n auto. Root cause: missing
[tool.coverage.run] parallel=true in pyproject.toml. Without it,
each worker overwrites .coverage atomically and the report drops
data from all but one worker.

Fix:
- pyproject.toml: add [tool.coverage.run] with parallel=true,
  source=["src"], concurrency=["multiprocessing","thread"]. Verified
  locally: 56-test xdist run produces a clean combined coverage
  report at 99% (vs flaky/missing data before).
- dev/scripts/backends/gitea.py + github.py: add -n auto to the
  emitted pytest command. Also persist the deploy.yml report-step
  failure gate (was applied to the file in 5f826f6 but the emitter
  itself didn't have it, so regen would strip it).
- .gitea/workflows/ci.yml: regenerated to pick up -n auto.

The 32-core runner should now run CI pytest in roughly 1/Nth the
prior time (where N is bounded by serialization on slow tests).

Phase 1 of #388 (pre-commit hook xdist) shipped in 49f004a.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-23 19:19:56 -04:00
..