CI Perf Lint

pytest-xdist-installed-but-not-used

Detects CI pytest commands that run without parallel workers despite pytest-xdist being installed.

Why it matters

pytest-xdist can significantly reduce wall-clock time for large test suites by distributing tests across CPU cores. Since the project already includes pytest-xdist as a dependency, parallel execution was likely intended but not enabled in CI.

Detection

Reports when all of the following are true:

Commands are evaluated separately, including python -m pytest and uv/Poetry/PDM run wrappers. Static workflow/job/step env values are merged with step precedence before checking flags; unknown expansion prevents a claim that parallel workers are absent. Locations identify the actual run command, rather than the workflow’s first line.

Exclusions

Does not report when:

Severity

warning — the project already opted into pytest-xdist but is not using it in CI.