Run CI in parallel jobs with a uv cache #21

Merged
alexander merged 5 commits from ci-and-infra into develop 2026-12-03 01:25:33 +01:00
Owner
  • Split CI into a "Lint" job and a matrix of test jobs, incl. the "test-with" sessions for 3.13 and 3.15
  • Pull the shared setup into a composite action that installs all supported Python versions via uv
  • Cache built wheels (e.g., rpy2) and Python versions between runs; only "Lint" saves, and only when the key changed
  • Install only nox and pre-commit in the develop environment
  • Name the job without a version and add a timeout

Wall time: about 2m15s with all supported versions, against 2m51s for the main version only.

- Split CI into a "Lint" job and a matrix of test jobs, incl. the "test-with" sessions for 3.13 and 3.15 - Pull the shared setup into a composite action that installs all supported Python versions via `uv` - Cache built wheels (e.g., `rpy2`) and Python versions between runs; only "Lint" saves, and only when the key changed - Install only `nox` and `pre-commit` in the develop environment - Name the job without a version and add a timeout Wall time: about 2m15s with all supported versions, against 2m51s for the main version only.
The version in the name broke the required status check
when 3.14 became the `MAIN_PYTHON`.

The timeout ensures the CI server stays ready
even when something goes badly wrong.
The upcoming parallel jobs share it.
The test sessions run as a matrix, each with its own database.

This also adds the "test-with" sessions to CI;
so, the setup installs all `SUPPORTED_PYTHONS` via `uv`,
as `nox` would otherwise pick the system Python 3.13,
which lacks the headers to build `rpy2`.
All jobs restore built wheels (e.g., `rpy2`) and the Python versions
instead of building or fetching them again.

Only the "lint" job saves the cache, pruned to what is expensive to rebuild,
and only when its key changed; so, five jobs do not compress the same archive
in parallel, and unchanged runs skip the 15s of packing.
Install only nox and pre-commit in CI
All checks were successful
CI / Tests (test-types) (push) Successful in 2m3s
CI / Tests (test) (push) Successful in 2m6s
CI / Tests (test-with-3.15) (push) Successful in 2m10s
CI / Lint (push) Successful in 2m20s
CI / Tests (test-with-3.13) (push) Successful in 2m21s
8b5e66d70b
The `nox` sessions install `velofy` and its dependencies themselves;
so, a full `uv sync` only duplicated that work.
alexander merged commit e5c7487515 into develop 2026-12-03 01:25:33 +01:00
alexander deleted branch ci-and-infra 2026-12-03 01:25:34 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
alexander/velofy!21
No description provided.