TEST-INFRA: [ci-pipeline-design] Parallelize unit, integration, and E2E test execution #2761

Open
opened 2026-04-04 19:16:06 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: task/ci-parallelize-test-jobs
  • Commit Message: feat(ci): parallelize unit, integration, and e2e test job execution
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The current CI pipeline in .forgejo/workflows/ci.yml runs unit_tests, integration_tests, and e2e_tests sequentially. These test suites are fully independent of one another — they do not share state, produce conflicting artifacts, or require ordering — and can therefore be scheduled concurrently by the CI runner to significantly reduce overall pipeline wall-clock time.

This issue is a child of Epic #1678 (CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing), which tracks all structural improvements to the CI pipeline's execution efficiency.

Current Behavior

The unit_tests, integration_tests, and e2e_tests jobs execute one after another in the CI pipeline. The total execution time is the sum of all three suites, even though none depends on the output of another.

Expected Behavior

All three test jobs (unit_tests, integration_tests, e2e_tests) run in parallel. The status-check job (or equivalent gate job) waits for all three to complete before proceeding. Total CI execution time is reduced to approximately the duration of the longest single suite.

Acceptance Criteria

  • The unit_tests, integration_tests, and e2e_tests jobs have no needs: dependency on each other in .forgejo/workflows/ci.yml.
  • All three jobs are scheduled concurrently by the CI runner.
  • The status-check (or final gate) job lists all three test jobs in its needs: block so it waits for all of them.
  • The pipeline remains stable: all tests are still executed and results are correctly reported.
  • features/ci_workflow_validation.feature is updated to assert the parallel structure.

Supporting Information

  • Relevant file: .forgejo/workflows/ci.yml
  • Parent Epic: #1678 — CI Execution Time Optimization
  • Architectural context: The project uses nox as the task runner for all test execution (nox -s unit_tests, nox -s integration_tests, nox -s e2e_tests). Each nox session is self-contained.

Subtasks

  • Audit .forgejo/workflows/ci.yml to identify any implicit or explicit needs: dependencies that force sequential execution of unit_tests, integration_tests, and e2e_tests.
  • Remove sequential dependencies between the three test jobs so they can be scheduled in parallel.
  • Ensure the status-check (or equivalent gate) job has all three test jobs listed in its needs: block.
  • Update features/ci_workflow_validation.feature to add/update scenarios asserting that the three test jobs run in parallel (no cross-dependencies).
  • Tests (Behave): Verify existing CI validation scenarios still pass.
  • Tests (Robot): Add or update integration test asserting pipeline structure if applicable.
  • Verify coverage >= 97% via nox -s coverage_report.
  • Run nox (all default sessions) and fix any errors.

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (feat(ci): parallelize unit, integration, and e2e test job execution), 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 (task/ci-parallelize-test-jobs).
  • The commit is submitted as a pull request to master, reviewed, and merged before this issue is marked done.
  • The unit_tests, integration_tests, and e2e_tests jobs demonstrably run in parallel in CI.
  • The total CI execution time is reduced.
  • The pipeline remains stable and all tests are still executed and reported correctly.
  • All nox stages pass.
  • Coverage >= 97%.

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

## Metadata - **Branch**: `task/ci-parallelize-test-jobs` - **Commit Message**: `feat(ci): parallelize unit, integration, and e2e test job execution` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The current CI pipeline in `.forgejo/workflows/ci.yml` runs `unit_tests`, `integration_tests`, and `e2e_tests` sequentially. These test suites are fully independent of one another — they do not share state, produce conflicting artifacts, or require ordering — and can therefore be scheduled concurrently by the CI runner to significantly reduce overall pipeline wall-clock time. This issue is a child of Epic #1678 (CI Execution Time Optimization — Timeouts, Concurrency, and Coverage Artifact Sharing), which tracks all structural improvements to the CI pipeline's execution efficiency. ## Current Behavior The `unit_tests`, `integration_tests`, and `e2e_tests` jobs execute one after another in the CI pipeline. The total execution time is the sum of all three suites, even though none depends on the output of another. ## Expected Behavior All three test jobs (`unit_tests`, `integration_tests`, `e2e_tests`) run in parallel. The `status-check` job (or equivalent gate job) waits for all three to complete before proceeding. Total CI execution time is reduced to approximately the duration of the longest single suite. ## Acceptance Criteria - The `unit_tests`, `integration_tests`, and `e2e_tests` jobs have no `needs:` dependency on each other in `.forgejo/workflows/ci.yml`. - All three jobs are scheduled concurrently by the CI runner. - The `status-check` (or final gate) job lists all three test jobs in its `needs:` block so it waits for all of them. - The pipeline remains stable: all tests are still executed and results are correctly reported. - `features/ci_workflow_validation.feature` is updated to assert the parallel structure. ## Supporting Information - Relevant file: `.forgejo/workflows/ci.yml` - Parent Epic: #1678 — CI Execution Time Optimization - Architectural context: The project uses `nox` as the task runner for all test execution (`nox -s unit_tests`, `nox -s integration_tests`, `nox -s e2e_tests`). Each nox session is self-contained. ## Subtasks - [ ] Audit `.forgejo/workflows/ci.yml` to identify any implicit or explicit `needs:` dependencies that force sequential execution of `unit_tests`, `integration_tests`, and `e2e_tests`. - [ ] Remove sequential dependencies between the three test jobs so they can be scheduled in parallel. - [ ] Ensure the `status-check` (or equivalent gate) job has all three test jobs listed in its `needs:` block. - [ ] Update `features/ci_workflow_validation.feature` to add/update scenarios asserting that the three test jobs run in parallel (no cross-dependencies). - [ ] Tests (Behave): Verify existing CI validation scenarios still pass. - [ ] Tests (Robot): Add or update integration test asserting pipeline structure if applicable. - [ ] Verify coverage >= 97% via `nox -s coverage_report`. - [ ] Run `nox` (all default sessions) and fix any errors. ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`feat(ci): parallelize unit, integration, and e2e test job execution`), 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 (`task/ci-parallelize-test-jobs`). - The commit is submitted as a **pull request** to `master`, reviewed, and **merged** before this issue is marked done. - The `unit_tests`, `integration_tests`, and `e2e_tests` jobs demonstrably run in parallel in CI. - The total CI execution time is reduced. - The pipeline remains stable and all tests are still executed and reported correctly. - 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-04 19:16:12 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High (downgrading to Medium would be appropriate — CI optimization is valuable but not blocking feature work)
  • Milestone: v3.8.0 (already set)
  • MoSCoW: Could Have — CI parallelization is a quality-of-life improvement for developer velocity. The test suites are independent and can run concurrently, but the current sequential execution is not blocking any feature development or releases.
  • Parent Epic: #1678 (CI Execution Time Optimization)

This is a good improvement to make when bandwidth allows, but should not take priority over Must Have or Should Have items.


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

Issue triaged by project owner: - **State**: Verified - **Priority**: High (downgrading to Medium would be appropriate — CI optimization is valuable but not blocking feature work) - **Milestone**: v3.8.0 (already set) - **MoSCoW**: Could Have — CI parallelization is a quality-of-life improvement for developer velocity. The test suites are independent and can run concurrently, but the current sequential execution is not blocking any feature development or releases. - **Parent Epic**: #1678 (CI Execution Time Optimization) This is a good improvement to make when bandwidth allows, but should not take priority over Must Have or Should Have items. --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
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#2761
No description provided.