TEST-INFRA: [ci-pipeline-design] Implement conditional execution for CI jobs #7466

Open
opened 2026-04-10 20:03:45 +00:00 by HAL9000 · 3 comments
Owner

Metadata

  • Branch: task/ci-pipeline-design-conditional-execution
  • Commit Message: chore(ci): implement path-filter conditional execution for CI jobs
  • Milestone: N/A — Backlog (see note below)
  • Parent Epic: #1678

Backlog note: This issue was discovered during autonomous operation
on milestone v3.2.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 current CI pipeline runs all jobs on every push and pull request, regardless of which files have changed. This leads to unnecessary resource consumption and longer feedback cycles. Implementing conditional execution via path filters will ensure that only jobs relevant to the changed files are triggered.

Current Behavior

All CI jobs (docs, unit_tests, integration_tests, lint, typecheck, etc.) execute on every push and pull request, even when the changed files are unrelated to the job's scope. For example, a documentation-only change triggers the full test suite.

Expected Behavior

CI jobs should only execute when files relevant to their scope have changed. For example:

  • The docs job should only run if files in the docs/ directory have changed.
  • The unit_tests and integration_tests jobs should only run if files in src/ or tests/ (or features/, robot/) have changed.

Acceptance Criteria

  • CI jobs are only executed when relevant files have changed.
  • The CI pipeline is more efficient and provides faster feedback.
  • Path filters are documented in .forgejo/workflows/ci.yml with inline comments explaining each filter's scope.

Supporting Information

  • Related issues: #7435 (matrix build strategy), #7430 (parallelize CI jobs), Epic #1678 (CI Execution Time Optimization).
  • Forgejo Actions supports paths and paths-ignore filters on workflow triggers.

Subtasks

  • Modify the .forgejo/workflows/ci.yml file to use path filters to conditionally execute jobs.
  • The docs job should only run if files in the docs/ directory have changed.
  • The unit_tests and integration_tests jobs should only run if files in the src/, features/, or robot/ directories have changed.
  • Update features/ci_workflow_validation.feature to assert path filter conditions are present for each job.
  • Run nox (all default sessions), fix any errors.
  • Verify coverage >= 97% via nox -s coverage_report.

Definition of Done

  • CI jobs are only executed when relevant files have changed.
  • The CI pipeline is more efficient and provides faster feedback.
  • Path filters are present and documented in .forgejo/workflows/ci.yml.
  • features/ci_workflow_validation.feature is updated to cover path filter assertions.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation.
  • The commit is pushed to the remote on the branch matching the Branch in Metadata exactly.
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • All nox stages pass.
  • Coverage >= 97%

Duplicate Check

  • Searched for "conditional execution": 0 results
  • Searched for "path filters": 0 results
  • This issue is not a duplicate.

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

## Metadata - **Branch**: `task/ci-pipeline-design-conditional-execution` - **Commit Message**: `chore(ci): implement path-filter conditional execution for CI jobs` - **Milestone**: N/A — Backlog (see note below) - **Parent Epic**: #1678 > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.2.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 current CI pipeline runs all jobs on every push and pull request, regardless of which files have changed. This leads to unnecessary resource consumption and longer feedback cycles. Implementing conditional execution via path filters will ensure that only jobs relevant to the changed files are triggered. ## Current Behavior All CI jobs (docs, unit_tests, integration_tests, lint, typecheck, etc.) execute on every push and pull request, even when the changed files are unrelated to the job's scope. For example, a documentation-only change triggers the full test suite. ## Expected Behavior CI jobs should only execute when files relevant to their scope have changed. For example: - The `docs` job should only run if files in the `docs/` directory have changed. - The `unit_tests` and `integration_tests` jobs should only run if files in `src/` or `tests/` (or `features/`, `robot/`) have changed. ## Acceptance Criteria - [ ] CI jobs are only executed when relevant files have changed. - [ ] The CI pipeline is more efficient and provides faster feedback. - [ ] Path filters are documented in `.forgejo/workflows/ci.yml` with inline comments explaining each filter's scope. ## Supporting Information - Related issues: #7435 (matrix build strategy), #7430 (parallelize CI jobs), Epic #1678 (CI Execution Time Optimization). - Forgejo Actions supports `paths` and `paths-ignore` filters on workflow triggers. ## Subtasks - [ ] Modify the `.forgejo/workflows/ci.yml` file to use path filters to conditionally execute jobs. - [ ] The `docs` job should only run if files in the `docs/` directory have changed. - [ ] The `unit_tests` and `integration_tests` jobs should only run if files in the `src/`, `features/`, or `robot/` directories have changed. - [ ] Update `features/ci_workflow_validation.feature` to assert path filter conditions are present for each job. - [ ] Run `nox` (all default sessions), fix any errors. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. ## Definition of Done - [ ] CI jobs are only executed when relevant files have changed. - [ ] The CI pipeline is more efficient and provides faster feedback. - [ ] Path filters are present and documented in `.forgejo/workflows/ci.yml`. - [ ] `features/ci_workflow_validation.feature` is updated to cover path filter assertions. - [ ] A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly, followed by a blank line, then additional lines providing relevant details about the implementation. - [ ] The commit is pushed to the remote on the branch matching the **Branch** in Metadata exactly. - [ ] The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - [ ] All nox stages pass. - [ ] Coverage >= 97% ### Duplicate Check - Searched for "conditional execution": 0 results - Searched for "path filters": 0 results - This issue is not a duplicate. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: new-issue-creator
Author
Owner

Verified — CI improvement: conditional execution for CI jobs. MoSCoW: Could-have. Priority: Low.


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

✅ **Verified** — CI improvement: conditional execution for CI jobs. MoSCoW: Could-have. Priority: Low. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — CI improvement: conditional execution for CI jobs. MoSCoW: Could-have. Priority: Low.


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

✅ **Verified** — CI improvement: conditional execution for CI jobs. MoSCoW: Could-have. Priority: Low. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
Author
Owner

Verified — CI improvement: conditional execution for CI jobs. MoSCoW: Could-have. Priority: Low.


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

✅ **Verified** — CI improvement: conditional execution for CI jobs. MoSCoW: Could-have. Priority: Low. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner-pool-supervisor
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#7466
No description provided.