TEST-INFRA: [ci-pipeline-design] Add Dependency Caching to CI Pipeline #3620

Open
opened 2026-04-05 20:53:00 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: task/v3.8.0-ci-dependency-caching
  • Commit Message: chore(ci): add uv and pip dependency caching to CI pipeline
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background

The current CI pipeline, as defined in noxfile.py and .forgejo/workflows/ci.yml, does not explicitly configure caching for dependencies. This results in the re-downloading and re-installation of uv and pip dependencies for every CI run, which can significantly increase wall-clock execution time and wastes runner capacity.

This task is a direct complement to the broader CI execution time optimization effort tracked in Epic #1678, which addresses concurrency groups, job-level timeouts, and coverage artifact sharing. Dependency caching is a further structural improvement that reduces cold-start overhead on every job that installs packages.

Expected Behavior

The CI pipeline should cache the uv cache directory (and/or pip cache directory) between runs on the same branch. Subsequent CI runs that have no dependency changes should restore from cache and skip re-downloading packages entirely, resulting in measurably reduced CI execution time.

Subtasks

  • Investigate the best caching strategy for uv and pip in the Forgejo Actions CI environment (e.g., actions/cache with ~/.cache/uv and ~/.cache/pip).
  • Modify .forgejo/workflows/ci.yml to add cache restore/save steps for uv and pip cache directories in all relevant jobs.
  • Verify that the dependency caching is working as expected (cache hit on second run) and that CI execution time is measurably reduced.
  • Update features/ci_workflow_validation.feature to assert that cache steps are present in the CI workflow.
  • Run nox (all default sessions) and fix any errors.
  • Verify coverage >= 97% via nox -s coverage_report.

Definition of Done

  • The CI pipeline (.forgejo/workflows/ci.yml) is configured to cache uv and/or pip dependencies between runs.
  • Cache keys are correctly scoped (e.g., keyed on OS + dependency lockfile hash) to avoid stale cache hits.
  • CI execution time is measurably reduced on cache-hit runs.
  • features/ci_workflow_validation.feature is updated to cover the new caching steps.
  • All nox stages pass.
  • Coverage >= 97%.

Backlog note: This issue was discovered during autonomous operation
on milestone v3.8.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


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

## Metadata - **Branch**: `task/v3.8.0-ci-dependency-caching` - **Commit Message**: `chore(ci): add uv and pip dependency caching to CI pipeline` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background The current CI pipeline, as defined in `noxfile.py` and `.forgejo/workflows/ci.yml`, does not explicitly configure caching for dependencies. This results in the re-downloading and re-installation of `uv` and `pip` dependencies for every CI run, which can significantly increase wall-clock execution time and wastes runner capacity. This task is a direct complement to the broader CI execution time optimization effort tracked in Epic #1678, which addresses concurrency groups, job-level timeouts, and coverage artifact sharing. Dependency caching is a further structural improvement that reduces cold-start overhead on every job that installs packages. ## Expected Behavior The CI pipeline should cache the `uv` cache directory (and/or `pip` cache directory) between runs on the same branch. Subsequent CI runs that have no dependency changes should restore from cache and skip re-downloading packages entirely, resulting in measurably reduced CI execution time. ## Subtasks - [ ] Investigate the best caching strategy for `uv` and `pip` in the Forgejo Actions CI environment (e.g., `actions/cache` with `~/.cache/uv` and `~/.cache/pip`). - [ ] Modify `.forgejo/workflows/ci.yml` to add cache restore/save steps for `uv` and `pip` cache directories in all relevant jobs. - [ ] Verify that the dependency caching is working as expected (cache hit on second run) and that CI execution time is measurably reduced. - [ ] Update `features/ci_workflow_validation.feature` to assert that cache steps are present in the CI workflow. - [ ] Run `nox` (all default sessions) and fix any errors. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. ## Definition of Done - [ ] The CI pipeline (`.forgejo/workflows/ci.yml`) is configured to cache `uv` and/or `pip` dependencies between runs. - [ ] Cache keys are correctly scoped (e.g., keyed on OS + dependency lockfile hash) to avoid stale cache hits. - [ ] CI execution time is measurably reduced on cache-hit runs. - [ ] `features/ci_workflow_validation.feature` is updated to cover the new caching steps. - [ ] All nox stages pass. - [ ] Coverage >= 97%. > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.8.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-05 20:53:16 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High (confirmed) — CI dependency caching directly reduces CI execution time for every run, improving developer velocity across the entire project.
  • Milestone: v3.8.0 (confirmed)
  • Story Points: 3 — M — Well-scoped CI configuration change. Requires investigating caching strategy, modifying workflow YAML, and verifying cache hits.
  • MoSCoW: Could Have — While CI performance is important, dependency caching is an optimization, not a functional requirement. The CI pipeline works correctly without it; it just takes longer.
  • Parent Epic: #1678

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

Issue triaged by project owner: - **State**: Verified - **Priority**: High (confirmed) — CI dependency caching directly reduces CI execution time for every run, improving developer velocity across the entire project. - **Milestone**: v3.8.0 (confirmed) - **Story Points**: 3 — M — Well-scoped CI configuration change. Requires investigating caching strategy, modifying workflow YAML, and verifying cache hits. - **MoSCoW**: Could Have — While CI performance is important, dependency caching is an optimization, not a functional requirement. The CI pipeline works correctly without it; it just takes longer. - **Parent Epic**: #1678 --- **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#3620
No description provided.