Skip to content

Commit c8fc05c

Browse files
committed
Install only the dependency group each CI job needs
The 3.14t (free-threaded) test jobs took 4-6x longer than every other matrix entry: 227s on Linux, 268s on macOS, 466s on Windows, versus ~60-100s elsewhere. The tests were never the problem. Splitting run 33980426857 by step shows pytest itself finishing in 30s on 3.14t versus 34s on 3.14 -- the free-threaded build is marginally faster. The time went entirely to "Install the project", 172s versus 5s. The install log pinpoints it: zensical has no cp314t wheel on PyPI, so uv compiled the Rust extension from source, taking 2m46s. zensical is a docs dependency that the test job never uses. It was pulled in because the job ran `uv sync --all-extras --dev`, and the dev group carries zensical alongside mypy, ruff, ty, ipython and prek. (`--all-extras` was also a no-op; the project defines no optional-dependencies.) The repo already had a purpose-built `test` group that was going unused. Switch each workflow to the group it actually needs. `--no-default- groups` is required because uv syncs `dev` by default, so a bare `--group test` still drags zensical in. Measured on a real 3.14t interpreter with a cold cache: install drops from 100s to 2.0s, and the suite still reports 1856 passed, 2 skipped with 99% coverage. The quality and docs jobs shed unused packages too, 72 -> 10 and 72 -> 36 respectively; those run only on non-free-threaded 3.14 where wheels exist, so the gain there is download time rather than a compile. Verified by running each job's real command against a clean group-only venv: all 14 prek hooks pass, and `zensical build -s` reports no issues. This was purely a CI packaging artifact. Nothing about cmd2 on free-threaded Python is slow. Claude-Session: https://claude.ai/code/session_018CfZY5p6TbSt3WtNrwU1Ej
1 parent bf2a3ba commit c8fc05c

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎.github/workflows/docs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,6 @@ jobs:
2626
with:
2727
python-version: "3.14"
2828
- name: Install the project
29-
run: uv sync --group docs
29+
run: uv sync --no-default-groups --group docs
3030
- name: Check if the Zensical documentation can be built
3131
run: uv run zensical build -s

‎.github/workflows/quality.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,6 @@ jobs:
2828
with:
2929
python-version: "3.14"
3030
- name: Install the project
31-
run: uv sync --group quality
31+
run: uv sync --no-default-groups --group quality
3232
- name: Run prek
3333
run: uv run prek run -a --show-diff-on-failure

‎.github/workflows/tests.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
python-version: ${{ matrix.python-version }}
3434
allow-prereleases: true
3535
- name: Install the project
36-
run: uv sync --all-extras --dev
36+
run: uv sync --no-default-groups --group test
3737

3838
- name: Run tests
3939
run: uv run python -Xutf8 -m pytest --cov --cov-config=pyproject.toml --cov-report=xml tests

0 commit comments

Comments
 (0)