TEST-INFRA: [ci-pipeline-design] Eliminate redundant setup in CI jobs #1658

Closed
opened 2026-04-02 23:24:51 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: task/v3.8.0-ci-eliminate-redundant-setup
  • Commit Message: chore(ci): eliminate redundant setup steps by introducing a shared setup job
  • Milestone: v3.8.0
  • Parent Epic: #397

Background and Context

The current CI pipeline in .forgejo/workflows/ci.yml has a significant amount of redundant setup code. Each job (lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests, coverage, build, docker, helm) independently repeats the same initial steps:

  1. Installing Node.js
  2. Checking out the repository
  3. Installing uv and nox

This redundancy makes the pipeline inefficient (each job re-runs identical setup work), slower than necessary, and harder to maintain (changes to setup steps must be replicated across every job individually).

Subtasks

  • Create a new setup job in .forgejo/workflows/ci.yml that installs Node.js, checks out the repository, and installs uv and nox.
  • Configure the setup job to cache installed dependencies (e.g., uv package cache and nox virtual environments) so downstream jobs can reuse them.
  • Add needs: [setup] to all downstream jobs (lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests, coverage, build, docker, helm).
  • Remove the redundant setup steps (Node.js install, checkout, uv/nox install) from all downstream jobs.
  • Ensure all downstream jobs correctly restore the cached dependencies produced by the setup job.
  • Run nox (all default sessions) and fix any errors introduced by the refactor.
  • Verify coverage >= 97% via nox -s coverage_report.

Definition of Done

  • A new setup job exists in .forgejo/workflows/ci.yml that performs all common initial setup steps.
  • All other CI jobs declare needs: [setup] and no longer duplicate setup steps.
  • Dependency caching is configured in the setup job and correctly consumed by downstream jobs.
  • The CI pipeline runs successfully end-to-end with the refactored structure.
  • The Git commit uses the exact first line from the Metadata section above.
  • The commit is pushed to the branch specified in the Metadata section.
  • A Pull Request has been created, reviewed, and merged.
  • All nox stages pass.
  • Coverage >= 97%

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

## Metadata - **Branch**: `task/v3.8.0-ci-eliminate-redundant-setup` - **Commit Message**: `chore(ci): eliminate redundant setup steps by introducing a shared setup job` - **Milestone**: v3.8.0 - **Parent Epic**: #397 ## Background and Context The current CI pipeline in `.forgejo/workflows/ci.yml` has a significant amount of redundant setup code. Each job (`lint`, `typecheck`, `security`, `quality`, `unit_tests`, `integration_tests`, `e2e_tests`, `coverage`, `build`, `docker`, `helm`) independently repeats the same initial steps: 1. Installing Node.js 2. Checking out the repository 3. Installing `uv` and `nox` This redundancy makes the pipeline inefficient (each job re-runs identical setup work), slower than necessary, and harder to maintain (changes to setup steps must be replicated across every job individually). ## Subtasks - [ ] Create a new `setup` job in `.forgejo/workflows/ci.yml` that installs Node.js, checks out the repository, and installs `uv` and `nox`. - [ ] Configure the `setup` job to cache installed dependencies (e.g., `uv` package cache and `nox` virtual environments) so downstream jobs can reuse them. - [ ] Add `needs: [setup]` to all downstream jobs (`lint`, `typecheck`, `security`, `quality`, `unit_tests`, `integration_tests`, `e2e_tests`, `coverage`, `build`, `docker`, `helm`). - [ ] Remove the redundant setup steps (Node.js install, checkout, `uv`/`nox` install) from all downstream jobs. - [ ] Ensure all downstream jobs correctly restore the cached dependencies produced by the `setup` job. - [ ] Run `nox` (all default sessions) and fix any errors introduced by the refactor. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. ## Definition of Done - [ ] A new `setup` job exists in `.forgejo/workflows/ci.yml` that performs all common initial setup steps. - [ ] All other CI jobs declare `needs: [setup]` and no longer duplicate setup steps. - [ ] Dependency caching is configured in the `setup` job and correctly consumed by downstream jobs. - [ ] The CI pipeline runs successfully end-to-end with the refactored structure. - [ ] The Git commit uses the exact first line from the Metadata section above. - [ ] The commit is pushed to the branch specified in the Metadata section. - [ ] A Pull Request has been created, reviewed, and merged. - [ ] 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-02 23:25:28 +00:00
Author
Owner

Closing as duplicate of #1604 (CI setup consolidation). This CI improvement is already tracked.


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

Closing as duplicate of #1604 (CI setup consolidation). This CI improvement is already tracked. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo 2026-04-02 23:30:56 +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.

Blocks
#397 Epic: Server & Autonomy Infrastructure
cleveragents/cleveragents-core
Reference
cleveragents/cleveragents-core#1658
No description provided.