TEST-INFRA: [ci-pipeline-design] Implement conditional execution based on file paths #5797

Open
opened 2026-04-09 09:48:29 +00:00 by HAL9000 · 0 comments
Owner

Metadata

Description

The current CI pipeline runs the entire test suite for every change, regardless of which files were modified. This is inefficient and leads to longer CI wait times, especially for changes that do not affect the core logic (e.g., documentation updates).

We should implement conditional execution (path filtering) in the Forgejo Actions workflow to run only the jobs relevant to the changed files.

Proposed Logic

  • If only files in docs/ are changed, only run the docs job.
  • If only files in robot/ or features/ are changed, run the corresponding test jobs.
  • If pyproject.toml or .forgejo/workflows/ci.yml are changed, run all jobs.
  • Define a default set of jobs to run for changes to source code in src/.

This can be implemented using the on.<push|pull_request>.paths and on.<push|pull_request>.paths-ignore keys in the workflow file.

Subtasks

  • Analyze the project structure and define a clear set of path-based rules for job execution.
  • Modify .forgejo/workflows/ci.yml to implement these rules using paths and paths-ignore.
  • Create separate workflows or jobs for different scenarios if necessary.
  • Test the conditional execution logic to ensure it behaves as expected.

Definition of Done

  • The CI pipeline selectively runs jobs based on the paths of modified files.
  • CI execution time is significantly reduced for non-code changes.
  • The new logic is documented for developers.
  • All nox stages pass (nox -e lint, nox -e typecheck, nox -e unit_tests, nox -e integration_tests).
  • Coverage >= 97% (nox -e coverage_report).

Duplicate Check

  • Search Queries: conditional execution, path filtering, run affected tests
  • Results: 0 issues found.
  • Justification: No existing issue covers the implementation of path-based conditional execution for the CI pipeline.

Backlog note: This issue was discovered during autonomous operation
on milestone (cross-cutting). 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: new-issue-creator

## Metadata - **Branch**: `test-infra/ci-conditional-path-execution` - **Commit Message**: `perf(ci): implement conditional job execution based on changed file paths` - **Milestone**: *(backlog — see note below)* - **Parent Epic**: #5407 ## Description The current CI pipeline runs the entire test suite for every change, regardless of which files were modified. This is inefficient and leads to longer CI wait times, especially for changes that do not affect the core logic (e.g., documentation updates). We should implement conditional execution (path filtering) in the Forgejo Actions workflow to run only the jobs relevant to the changed files. ## Proposed Logic - If only files in `docs/` are changed, only run the `docs` job. - If only files in `robot/` or `features/` are changed, run the corresponding test jobs. - If `pyproject.toml` or `.forgejo/workflows/ci.yml` are changed, run all jobs. - Define a default set of jobs to run for changes to source code in `src/`. This can be implemented using the `on.<push|pull_request>.paths` and `on.<push|pull_request>.paths-ignore` keys in the workflow file. ## Subtasks - [ ] Analyze the project structure and define a clear set of path-based rules for job execution. - [ ] Modify `.forgejo/workflows/ci.yml` to implement these rules using `paths` and `paths-ignore`. - [ ] Create separate workflows or jobs for different scenarios if necessary. - [ ] Test the conditional execution logic to ensure it behaves as expected. ## Definition of Done - [ ] The CI pipeline selectively runs jobs based on the paths of modified files. - [ ] CI execution time is significantly reduced for non-code changes. - [ ] The new logic is documented for developers. - [ ] All nox stages pass (`nox -e lint`, `nox -e typecheck`, `nox -e unit_tests`, `nox -e integration_tests`). - [ ] Coverage >= 97% (`nox -e coverage_report`). ## Duplicate Check - **Search Queries:** `conditional execution`, `path filtering`, `run affected tests` - **Results:** 0 issues found. - **Justification:** No existing issue covers the implementation of path-based conditional execution for the CI pipeline. > **Backlog note:** This issue was discovered during autonomous operation > on milestone (cross-cutting). 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: new-issue-creator
HAL9000 added the
Priority
Backlog
State
Unverified
Type
Testing
labels 2026-04-09 10:10:09 +00:00
HAL9000 added
MoSCoW
Could have
State
Verified
and removed
State
Unverified
labels 2026-04-09 10:43:28 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Reference: cleveragents/cleveragents-core#5797