TEST-INFRA: [ci-pipeline-design] Refactor CI workflow to use reusable workflows or composite actions #1738

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

Metadata

  • Branch: task/v3.8.0-ci-reusable-workflows-composite-actions
  • Commit Message: chore(ci): refactor ci.yml to use reusable workflows or composite actions
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The .forgejo/workflows/ci.yml file contains a significant amount of repeated boilerplate code. The following setup steps are duplicated across almost every job in the pipeline:

  • Install Node.js — repeated in every job that requires Node tooling
  • Install uv and nox — repeated in every job that runs Python tooling
  • Cache uv packages — repeated in every job that installs Python dependencies

This repetition makes the file difficult to read, maintain, and evolve. Any change to the setup procedure (e.g., upgrading Node.js or uv versions, adjusting cache keys) must be replicated manually across every job, increasing the risk of inconsistency and human error.

This issue is related to but broader in scope than #1701, which focuses specifically on extracting the uv/nox installation into a composite action. This issue covers the full set of repeated steps — including Node.js setup and uv package caching — and explicitly considers reusable workflows as an alternative or complementary approach.

Expected Behavior

Repeated setup steps in .forgejo/workflows/ci.yml are extracted into reusable composite actions (stored in .forgejo/actions/) or reusable workflow files (stored in .forgejo/workflows/). Each CI job references the shared setup mechanism rather than repeating the steps inline. The pipeline continues to function identically after the refactor.

Acceptance Criteria

  • The ci.yml file is refactored to use reusable workflows or composite actions.
  • The Install Node.js, Install uv and nox, and Cache uv packages steps are no longer repeated inline across multiple jobs.
  • The amount of repeated code in ci.yml is significantly reduced.
  • The CI pipeline continues to function as expected end-to-end after the refactor.

Supporting Information

  • Related issue: #1701 (Consolidate redundant setup steps — composite action for uv/nox)
  • Parent Epic: #1678 (CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing)
  • Affected file: .forgejo/workflows/ci.yml
  • New file(s): .forgejo/actions/setup-node/action.yml, .forgejo/actions/setup-uv-nox/action.yml (or equivalent reusable workflow files)

Subtasks

  • Audit .forgejo/workflows/ci.yml and identify all repeated setup step patterns (Node.js, uv/nox, cache)
  • Decide on approach: composite actions in .forgejo/actions/ vs. reusable workflow files vs. a combination
  • Create composite action (or reusable workflow) for Install Node.js setup steps
  • Create composite action (or reusable workflow) for Install uv and nox + Cache uv packages steps
  • Update all jobs in ci.yml to reference the new shared actions/workflows instead of inline steps
  • Remove all now-redundant inline setup steps from each job
  • Update features/ci_workflow_validation.feature to assert the composite actions/reusable workflows are used
  • Run nox (all default sessions) and fix any errors introduced by the refactor
  • Verify coverage >= 97% via nox -s coverage_report

Definition of Done

  • All repeated Install Node.js, Install uv and nox, and Cache uv packages steps are extracted from ci.yml into reusable composite actions or reusable workflow files
  • All jobs in ci.yml reference the shared setup mechanism; no job contains the old inline repeated steps
  • features/ci_workflow_validation.feature is updated to cover the new composite action/reusable workflow usage
  • 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-reusable-workflows-composite-actions` - **Commit Message**: `chore(ci): refactor ci.yml to use reusable workflows or composite actions` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The `.forgejo/workflows/ci.yml` file contains a significant amount of repeated boilerplate code. The following setup steps are duplicated across almost every job in the pipeline: - **Install Node.js** — repeated in every job that requires Node tooling - **Install uv and nox** — repeated in every job that runs Python tooling - **Cache uv packages** — repeated in every job that installs Python dependencies This repetition makes the file difficult to read, maintain, and evolve. Any change to the setup procedure (e.g., upgrading Node.js or uv versions, adjusting cache keys) must be replicated manually across every job, increasing the risk of inconsistency and human error. This issue is related to but broader in scope than #1701, which focuses specifically on extracting the `uv`/`nox` installation into a composite action. This issue covers the full set of repeated steps — including Node.js setup and uv package caching — and explicitly considers reusable workflows as an alternative or complementary approach. ## Expected Behavior Repeated setup steps in `.forgejo/workflows/ci.yml` are extracted into reusable composite actions (stored in `.forgejo/actions/`) or reusable workflow files (stored in `.forgejo/workflows/`). Each CI job references the shared setup mechanism rather than repeating the steps inline. The pipeline continues to function identically after the refactor. ## Acceptance Criteria - The `ci.yml` file is refactored to use reusable workflows or composite actions. - The `Install Node.js`, `Install uv and nox`, and `Cache uv packages` steps are no longer repeated inline across multiple jobs. - The amount of repeated code in `ci.yml` is significantly reduced. - The CI pipeline continues to function as expected end-to-end after the refactor. ## Supporting Information - Related issue: #1701 (Consolidate redundant setup steps — composite action for uv/nox) - Parent Epic: #1678 (CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing) - Affected file: `.forgejo/workflows/ci.yml` - New file(s): `.forgejo/actions/setup-node/action.yml`, `.forgejo/actions/setup-uv-nox/action.yml` (or equivalent reusable workflow files) ## Subtasks - [ ] Audit `.forgejo/workflows/ci.yml` and identify all repeated setup step patterns (Node.js, uv/nox, cache) - [ ] Decide on approach: composite actions in `.forgejo/actions/` vs. reusable workflow files vs. a combination - [ ] Create composite action (or reusable workflow) for `Install Node.js` setup steps - [ ] Create composite action (or reusable workflow) for `Install uv and nox` + `Cache uv packages` steps - [ ] Update all jobs in `ci.yml` to reference the new shared actions/workflows instead of inline steps - [ ] Remove all now-redundant inline setup steps from each job - [ ] Update `features/ci_workflow_validation.feature` to assert the composite actions/reusable workflows are used - [ ] Run `nox` (all default sessions) and fix any errors introduced by the refactor - [ ] Verify coverage >= 97% via `nox -s coverage_report` ## Definition of Done - [ ] All repeated `Install Node.js`, `Install uv and nox`, and `Cache uv packages` steps are extracted from `ci.yml` into reusable composite actions or reusable workflow files - [ ] All jobs in `ci.yml` reference the shared setup mechanism; no job contains the old inline repeated steps - [ ] `features/ci_workflow_validation.feature` is updated to cover the new composite action/reusable workflow usage - [ ] 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:39:09 +00:00
Author
Owner

Closing as duplicate of #1540 (reusable workflows).


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

Closing as duplicate of #1540 (reusable workflows). --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo 2026-04-02 23:41:42 +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.

Reference
cleveragents/cleveragents-core#1738
No description provided.