TEST-INFRA: [ci-pipeline-design] Implement dependency caching #1973

Closed
opened 2026-04-03 00:28:12 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: chore/m8-ci-dependency-caching
  • Commit Message: chore(ci): implement dependency caching for nox virtual environments
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The CI pipeline currently re-installs dependencies from scratch for every run. This is time-consuming and inefficient, particularly for nox virtual environments which must be rebuilt on each pipeline execution even when the underlying dependencies have not changed. Implementing a caching mechanism for dependencies will significantly reduce CI execution time and improve developer feedback loops.

Expected Behavior

Dependencies (particularly nox virtual environments and uv package caches) should be cached between CI runs and only invalidated when the relevant dependency lock files change.

Acceptance Criteria

  • A caching mechanism is configured for nox virtual environments in the CI pipeline.
  • The cache key is derived from the dependency lock file(s) (e.g., uv.lock, pyproject.toml) so that the cache is automatically invalidated when dependencies change.
  • CI execution time is measurably reduced compared to a baseline run without caching.
  • Cache hits and misses are observable in CI logs.

Subtasks

  • Investigate the caching mechanisms available in the CI platform (e.g., Forgejo Actions cache action).
  • Implement caching for nox virtual environments (.nox/ directory).
  • Implement caching for the uv package cache to avoid redundant downloads.
  • Define cache keys based on uv.lock / pyproject.toml hashes to ensure correct invalidation when dependencies change.
  • Verify cache invalidation works correctly when dependencies are updated.
  • Measure and document CI execution time improvement.
  • Run nox (all default sessions) and fix any errors.

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • 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.
  • Dependency caching is implemented and active in the CI pipeline.
  • The CI execution time is demonstrably reduced (documented with before/after timing).
  • All nox stages pass.
  • Coverage >= 97%.

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

## Metadata - **Branch**: `chore/m8-ci-dependency-caching` - **Commit Message**: `chore(ci): implement dependency caching for nox virtual environments` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The CI pipeline currently re-installs dependencies from scratch for every run. This is time-consuming and inefficient, particularly for `nox` virtual environments which must be rebuilt on each pipeline execution even when the underlying dependencies have not changed. Implementing a caching mechanism for dependencies will significantly reduce CI execution time and improve developer feedback loops. ## Expected Behavior Dependencies (particularly `nox` virtual environments and `uv` package caches) should be cached between CI runs and only invalidated when the relevant dependency lock files change. ## Acceptance Criteria - A caching mechanism is configured for `nox` virtual environments in the CI pipeline. - The cache key is derived from the dependency lock file(s) (e.g., `uv.lock`, `pyproject.toml`) so that the cache is automatically invalidated when dependencies change. - CI execution time is measurably reduced compared to a baseline run without caching. - Cache hits and misses are observable in CI logs. ## Subtasks - [ ] Investigate the caching mechanisms available in the CI platform (e.g., Forgejo Actions cache action). - [ ] Implement caching for `nox` virtual environments (`.nox/` directory). - [ ] Implement caching for the `uv` package cache to avoid redundant downloads. - [ ] Define cache keys based on `uv.lock` / `pyproject.toml` hashes to ensure correct invalidation when dependencies change. - [ ] Verify cache invalidation works correctly when dependencies are updated. - [ ] Measure and document CI execution time improvement. - [ ] Run `nox` (all default sessions) and fix any errors. ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - 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. - Dependency caching is implemented and active in the CI pipeline. - The CI execution time is demonstrably reduced (documented with before/after timing). - 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:28:31 +00:00
Author
Owner

Closing as duplicate of #3062 and #3095. All three issues address implementing dependency caching in CI. #3062 (verified, v3.8.0) is the canonical issue for this work.


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

Closing as duplicate of #3062 and #3095. All three issues address implementing dependency caching in CI. #3062 (verified, v3.8.0) is the canonical issue for this work. --- **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#1973
No description provided.