Cache nox virtualenvs in CI to reduce session setup time #2856

Open
opened 2026-04-04 20:58:31 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: task/cache-nox-virtualenvs
  • Commit Message: perf(ci): cache nox virtualenvs to reduce CI session setup time
  • Milestone: v3.8.0
  • Parent Epic: #1678

Subtasks

  • Identify the nox virtualenv cache directory (.nox/) and confirm it is consistent across runs
  • Add a CI cache step that saves and restores .nox/ keyed on pyproject.toml, noxfile.py, and the lock file
  • Verify cache hit/miss behaviour does not break any nox session (lint, typecheck, unit_tests, integration_tests, coverage_report)
  • Confirm that stale cache entries are invalidated correctly when dependencies change
  • Update CI documentation / comments to describe the caching strategy

Definition of Done

  • .nox/ virtualenvs are restored from cache on cache-hit runs, skipping full environment recreation
  • Cache key correctly invalidates when pyproject.toml, noxfile.py, or the lock file changes
  • All nox stages pass with a warm cache and with a cold cache
  • No nox session is broken by a stale or partial cache restore
  • All nox stages pass
  • Coverage >= 97%

Automated by CleverAgents Bot
Supervisor: Unknown | Agent: ca-new-issue-creator

## Metadata - **Branch**: `task/cache-nox-virtualenvs` - **Commit Message**: `perf(ci): cache nox virtualenvs to reduce CI session setup time` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Subtasks - [ ] Identify the nox virtualenv cache directory (`.nox/`) and confirm it is consistent across runs - [ ] Add a CI cache step that saves and restores `.nox/` keyed on `pyproject.toml`, `noxfile.py`, and the lock file - [ ] Verify cache hit/miss behaviour does not break any nox session (lint, typecheck, unit_tests, integration_tests, coverage_report) - [ ] Confirm that stale cache entries are invalidated correctly when dependencies change - [ ] Update CI documentation / comments to describe the caching strategy ## Definition of Done - [ ] `.nox/` virtualenvs are restored from cache on cache-hit runs, skipping full environment recreation - [ ] Cache key correctly invalidates when `pyproject.toml`, `noxfile.py`, or the lock file changes - [ ] All nox stages pass with a warm cache and with a cold cache - [ ] No nox session is broken by a stale or partial cache restore - [ ] All nox stages pass - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: Unknown | Agent: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-04 20:58:45 +00:00
Sign in to join this conversation.
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.

Reference
cleveragents/cleveragents-core#2856
No description provided.