Skip to content

ci: run the Python 3.12 pull-request tests in parallel without coverage - #492

Merged
chrisknvidia merged 2 commits into
mainfrom
ci/christopherk/fast-python-312-tests
Nov 13, 2026
Merged

chrisknvidia merged 2 commits into
mainfrom
ci/christopherk/fast-python-312-tests

Conversation

@chrisknvidia

@chrisknvidia chrisknvidia commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Tests (Python 3.12) is a required check and the slowest job by a wide margin. Last week its median was 39 minutes, against about 8 for the 3.13 and 3.14 jobs that run the same suite. It was the last job to finish on 364 of 369 pushes, so it set how long every PR waits for CI.

It is slow because it runs about 29,000 tests on one core under coverage tracing. Nothing on a pull request reads that coverage: coverage.xml is never uploaded and there is no threshold.

This PR changes the job in three ways:

  • Pull requests run uv run pytest -q -n auto, the same command as the 3.13 and 3.14 jobs.
  • Pushes to main keep the serial coverage run exactly as it was, so each merge still prints a coverage table. It stays serial for the reason ci: run main test jobs in parallel (-n auto) #261 found: timing-bound tests fail under coverage plus xdist load.
  • Fern validation moves ahead of the tests, so a docs break shows up in the first minute and is no longer skipped when a test fails.

The job id and check name are unchanged, so the "Protect main" ruleset needs no edit.

Measured on this PR

The 3.12 job took 11.5 minutes on the first push and 9.1 minutes on the second, against a median of about 39 minutes last week. The whole CI run finished in under 12 minutes both times. The 3.13 and 3.14 jobs were unchanged at 7.5 to 10.5 minutes.

Trade-offs

  • PRs no longer print a coverage table. To get one locally: uv run pytest --cov=skillevaluator --cov-report=term-missing.
  • A test that fails only under serial coverage tracing would now show up on main after merge instead of on the PR. Since ci: run main test jobs in parallel (-n auto) #261, every 3.12-only failure whose log could still be read (9 of them) was a wall-clock bound slowed by tracing, not a regression.
  • If Node setup or fern check fails, the 3.12 test step is skipped for that run. The 3.13 and 3.14 jobs still run the full suite.
  • The required 3.12 check now runs under xdist, like the required 3.13 check. Last week each xdist job failed alone on 1.1% of PR pushes and the serial coverage job on 1.4%, so this should not make it noisier.

Not in this PR

  • The wall-clock tests that still flake under coverage (tests/test_harbor_secure_docker_environment.py, tests/test_model_catalog.py) can still turn the main coverage run red about as often as before.
  • The pid-file race in the tests/test_harbor_local_mode.py cancellation tests is the most frequent open flake on the xdist jobs.
  • If a merge queue is added later, merge_group events would take the serial coverage step, so the step conditions need a second look then.

Verification

  • I am familiar with the Contributing Guidelines
  • Added or updated focused tests
  • Updated documentation for user-visible changes (none: CI only)
  • Ran make lint
  • Ran make test
  • Ran make build
  • Did not add credentials, private datasets, or proprietary benchmark content

tests/test_ci_workflows.py now pins both commands and both step conditions, that exactly one pytest step runs per event, and that Fern validation comes before the tests. All 44 tests in that file pass.

make lint and make build were run on the PR head with the locked Python 3.12 environment on macOS. Lint is clean, and the build produced the wheel and sdist.

make test stays unticked because I do not have a clean local run. The full suite did pass on Linux in this PR's CI on Python 3.12, 3.13 and 3.14, on both pushes. On the current head each job reports 30,841 passed, 81 skipped, 0 failed.

My local full run (uv run pytest -q -n auto, Python 3.12, macOS) had 31 failures. They are not from this change: run on their own, main and this branch give the same result, 24 fail and 7 pass.

  • 22 fail because Node on my Mac is broken. It crashes at startup on a missing libsimdjson library.
  • 2 fail because of environment variables set by the shell I launched the tests from, and pass once those are unset.
  • The 7 that pass are timing-sensitive tests that only failed during the full 12-worker run on a busy machine. I could not reproduce those failures.

Release Impact

  • No user-visible release note needed
  • Updated CHANGELOG.md

CI only, same as #261.

Tests (Python 3.12) is a required check and ran the whole suite serially
under coverage: a median of 39 minutes, against about 8 for the 3.13 and
3.14 jobs that run the same tests. Nothing on a pull request reads the
coverage report.

On pull requests the job now runs `pytest -q -n auto`, like the 3.13 and
3.14 jobs. Pushes to main keep the serial coverage run, which stays serial
because timing-bound tests fail under coverage plus xdist load (#261).

Fern validation moves ahead of the tests, so a docs break is reported in
the first minute and is not hidden by a failing test.

The job id and check name are unchanged.

Signed-off-by: Christopher Kevin <[email protected]>
@chrisknvidia
chrisknvidia marked this pull request as ready for review November 13, 2026 09:36

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 potential issue.

Devin Review

Comment thread .github/workflows/ci.yml Resolved
@chrisknvidia
chrisknvidia enabled auto-merge (squash) November 13, 2026 09:43
@chrisknvidia
chrisknvidia merged commit 3523764 into main Nov 13, 2026
24 checks passed
@chrisknvidia
chrisknvidia deleted the ci/christopherk/fast-python-312-tests branch November 13, 2026 10:06
devin-ai-integration Bot pushed a commit that referenced this pull request Nov 17, 2026
Main now runs the Python 3.12 pull-request tests in parallel without
coverage (#492) and keeps the source OSS-boundary scan for docs-only pull
requests, so this branch takes main's version of those steps. It keeps the
parallel Windows Tier 2 run and the aligned native Windows action pins.

Signed-off-by: Christopher Kevin <[email protected]>
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