TEST-INFRA: [ci-pipeline-design] Cache nox virtual environments #1977

Open
opened 2026-04-03 00:29:00 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: task/cache-nox-virtual-environments-ci
  • Commit Message: perf(ci): cache nox virtual environments to speed up CI builds
  • Milestone: v3.8.0
  • Parent Epic: #1678

Description

The CI workflow currently caches the uv packages, but it does not cache the nox virtual environments. This means that nox has to create a new virtual environment and install the dependencies for each session on every run.

Caching the .nox directory would speed up the builds by avoiding the need to create new virtual environments and install dependencies every time.

Subtasks

  • Modify the .forgejo/workflows/ci.yml file to cache the .nox directory.
  • The cache key should be based on the hash of the pyproject.toml file.
  • Run the CI workflow to verify that the caching is working correctly.
  • Update features/ci_workflow_validation.feature to assert the .nox cache step is present.
  • Confirm coverage ≥ 97% via nox -s coverage_report.
  • Run nox (all default sessions), fix any errors.

Definition of Done

This issue is complete when:

  • The .nox directory is cached in the CI workflow.
  • The cache key is based on the hash of the pyproject.toml file.
  • The CI workflow is faster as a result of the caching.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%

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

## Metadata - **Branch**: `task/cache-nox-virtual-environments-ci` - **Commit Message**: `perf(ci): cache nox virtual environments to speed up CI builds` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Description The CI workflow currently caches the `uv` packages, but it does not cache the `nox` virtual environments. This means that `nox` has to create a new virtual environment and install the dependencies for each session on every run. Caching the `.nox` directory would speed up the builds by avoiding the need to create new virtual environments and install dependencies every time. ## Subtasks - [ ] Modify the `.forgejo/workflows/ci.yml` file to cache the `.nox` directory. - [ ] The cache key should be based on the hash of the `pyproject.toml` file. - [ ] Run the CI workflow to verify that the caching is working correctly. - [ ] Update `features/ci_workflow_validation.feature` to assert the `.nox` cache step is present. - [ ] Confirm coverage ≥ 97% via `nox -s coverage_report`. - [ ] Run `nox` (all default sessions), fix any errors. ## Definition of Done This issue is complete when: - [ ] The `.nox` directory is cached in the CI workflow. - [ ] The cache key is based on the hash of the `pyproject.toml` file. - [ ] The CI workflow is faster as a result of the caching. - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - [ ] All nox stages pass. - [ ] Coverage >= 97% --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-03 00:29:57 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: Medium (confirmed)
  • Milestone: v3.8.0 (already assigned — CI infrastructure)
  • MoSCoW: Could Have — Caching nox virtual environments in CI reduces setup time but does not block any deliverables. This is a developer experience improvement.

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: ca-project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: Medium (confirmed) - **Milestone**: v3.8.0 (already assigned — CI infrastructure) - **MoSCoW**: Could Have — Caching nox virtual environments in CI reduces setup time but does not block any deliverables. This is a developer experience improvement. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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#1977
No description provided.