TEST-INFRA: [ci-pipeline-design] Reduce CI setup redundancy with a custom Docker image or composite action #3693

Open
opened 2026-04-05 22:12:24 +00:00 by freemo · 0 comments
Owner

Metadata

  • Branch: task/ci-pipeline-design-reduce-setup-redundancy
  • Commit Message: chore(ci): reduce job setup redundancy via custom Docker image or composite action
  • Milestone: N/A — Backlog (see note below)
  • Parent Epic: #1678

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

Background and Context

The main CI workflow (.forgejo/workflows/ci.yml) contains a significant amount of redundant setup code across multiple jobs. Jobs such as lint, typecheck, security, quality, unit_tests, integration_tests, e2e_tests, coverage, build, and helm all repeat the following steps:

  1. Install Node.js
  2. Checkout the repository (actions/checkout@v4)
  3. Install uv and nox
  4. Cache uv packages

This redundancy increases pipeline maintenance overhead and can slow down job startup times. Addressing it is a natural extension of the CI Execution Time Optimization work tracked in Epic #1678.

Proposed Solution

One of the following solutions should be evaluated and implemented:

  1. Custom Docker image: A dedicated Docker image with all necessary dependencies pre-installed (Node.js, Python, uv, nox, etc.), used as container.image for all relevant jobs — eliminating the need for these setup steps in the workflow file.

  2. Composite action: A composite action encapsulating the repeated setup steps, called at the beginning of each job to reduce code duplication in the main workflow file.

Subtasks

  • Evaluate the trade-offs between a custom Docker image and a composite action for this use case.
  • Implement the chosen solution to reduce setup redundancy.
  • Update .forgejo/workflows/ci.yml to use the new solution.
  • Update features/ci_workflow_validation.feature to assert the new setup mechanism is present.
  • Verify that the CI pipeline continues to function correctly after the changes.
  • Run nox (all default sessions), fix any errors.
  • Verify coverage >= 97% via nox -s coverage_report.

Definition of Done

  • The redundant setup steps have been removed from the CI workflow.
  • The CI pipeline is using either a custom Docker image or a composite action for setup.
  • The CI pipeline is passing for all jobs.
  • features/ci_workflow_validation.feature covers the new setup mechanism.
  • The changes have been documented if necessary.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Metadata - **Branch**: `task/ci-pipeline-design-reduce-setup-redundancy` - **Commit Message**: `chore(ci): reduce job setup redundancy via custom Docker image or composite action` - **Milestone**: N/A — Backlog (see note below) - **Parent Epic**: #1678 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.7.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. ## Background and Context The main CI workflow (`.forgejo/workflows/ci.yml`) contains a significant amount of redundant setup code across multiple jobs. Jobs such as `lint`, `typecheck`, `security`, `quality`, `unit_tests`, `integration_tests`, `e2e_tests`, `coverage`, `build`, and `helm` all repeat the following steps: 1. Install Node.js 2. Checkout the repository (`actions/checkout@v4`) 3. Install `uv` and `nox` 4. Cache `uv` packages This redundancy increases pipeline maintenance overhead and can slow down job startup times. Addressing it is a natural extension of the CI Execution Time Optimization work tracked in Epic #1678. ## Proposed Solution One of the following solutions should be evaluated and implemented: 1. **Custom Docker image**: A dedicated Docker image with all necessary dependencies pre-installed (Node.js, Python, `uv`, `nox`, etc.), used as `container.image` for all relevant jobs — eliminating the need for these setup steps in the workflow file. 2. **Composite action**: A composite action encapsulating the repeated setup steps, called at the beginning of each job to reduce code duplication in the main workflow file. ## Subtasks - [ ] Evaluate the trade-offs between a custom Docker image and a composite action for this use case. - [ ] Implement the chosen solution to reduce setup redundancy. - [ ] Update `.forgejo/workflows/ci.yml` to use the new solution. - [ ] Update `features/ci_workflow_validation.feature` to assert the new setup mechanism is present. - [ ] Verify that the CI pipeline continues to function correctly after the changes. - [ ] Run `nox` (all default sessions), fix any errors. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. ## Definition of Done - [ ] The redundant setup steps have been removed from the CI workflow. - [ ] The CI pipeline is using either a custom Docker image or a composite action for setup. - [ ] The CI pipeline is passing for all jobs. - [ ] `features/ci_workflow_validation.feature` covers the new setup mechanism. - [ ] The changes have been documented if necessary. - [ ] All nox stages pass. - [ ] Coverage >= 97%. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
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#3693
No description provided.