TEST-INFRA: [ci-execution-time] Optimize integration_tests CI job #1736

Closed
opened 2026-04-02 23:38:39 +00:00 by freemo · 2 comments
Owner

Metadata

  • Branch: task/ci-optimize-integration-tests
  • Commit Message: perf(ci): optimize integration_tests job execution time
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The integration_tests CI job is one of the slowest jobs in the pipeline, taking over 20 minutes to complete. This significantly slows down the developer feedback loop and contributes to overall CI wall-clock time. As part of the broader CI Execution Time Optimization Epic (#1678), this issue targets the integration_tests job specifically.

Current Behavior

The integration_tests CI job runs sequentially on a single runner with no parallelization, no test-suite splitting, and potentially suboptimal dependency caching. This results in execution times exceeding 20 minutes per run.

Expected Behavior

The integration_tests job should complete in under 10 minutes (≥50% reduction), achieved through a combination of parallelization, test-suite analysis, and improved caching strategies.

Acceptance Criteria

  • The execution time of the integration_tests job is reduced by at least 50% (from >20 min to <10 min).
  • All integration tests continue to pass after the optimizations are applied.
  • No mocks or test doubles are introduced into integration tests (per project policy: integration tests must exercise real services and real dependencies).
  • Changes are documented and communicated to the team.

Supporting Information

  • Parent Epic: #1678 (CI Execution Time Optimization)
  • Project policy: Integration tests must not use mocks — only real services and endpoints (see CONTRIBUTING.md § Test Isolation and Mock Placement).
  • CI workflow file: .forgejo/workflows/ci.yml

Subtasks

  • Analyze the integration_tests suite to identify the slowest individual tests and root causes
  • Implement parallelization: configure the CI job to run tests in parallel across multiple runners or using a parallel test execution strategy
  • Evaluate test-suite splitting: if parallelization alone is insufficient, split the suite into independent chunks runnable in parallel
  • Optimize dependency and build-artifact caching between CI runs for the integration_tests job
  • Update features/ci_workflow_validation.feature to assert any new parallelization or caching steps are present
  • 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.
  • The integration_tests CI job execution time is reduced by at least 50%.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (perf(ci): optimize integration_tests job execution time), followed by a blank line, then additional lines providing relevant implementation details.
  • The commit is pushed to the remote on the branch task/ci-optimize-integration-tests.
  • 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%.

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

## Metadata - **Branch**: `task/ci-optimize-integration-tests` - **Commit Message**: `perf(ci): optimize integration_tests job execution time` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The `integration_tests` CI job is one of the slowest jobs in the pipeline, taking over 20 minutes to complete. This significantly slows down the developer feedback loop and contributes to overall CI wall-clock time. As part of the broader CI Execution Time Optimization Epic (#1678), this issue targets the `integration_tests` job specifically. ## Current Behavior The `integration_tests` CI job runs sequentially on a single runner with no parallelization, no test-suite splitting, and potentially suboptimal dependency caching. This results in execution times exceeding 20 minutes per run. ## Expected Behavior The `integration_tests` job should complete in under 10 minutes (≥50% reduction), achieved through a combination of parallelization, test-suite analysis, and improved caching strategies. ## Acceptance Criteria - The execution time of the `integration_tests` job is reduced by at least 50% (from >20 min to <10 min). - All integration tests continue to pass after the optimizations are applied. - No mocks or test doubles are introduced into integration tests (per project policy: integration tests must exercise real services and real dependencies). - Changes are documented and communicated to the team. ## Supporting Information - Parent Epic: #1678 (CI Execution Time Optimization) - Project policy: Integration tests must **not** use mocks — only real services and endpoints (see CONTRIBUTING.md § Test Isolation and Mock Placement). - CI workflow file: `.forgejo/workflows/ci.yml` ## Subtasks - [ ] Analyze the `integration_tests` suite to identify the slowest individual tests and root causes - [ ] Implement parallelization: configure the CI job to run tests in parallel across multiple runners or using a parallel test execution strategy - [ ] Evaluate test-suite splitting: if parallelization alone is insufficient, split the suite into independent chunks runnable in parallel - [ ] Optimize dependency and build-artifact caching between CI runs for the `integration_tests` job - [ ] Update `features/ci_workflow_validation.feature` to assert any new parallelization or caching steps are present - [ ] 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. - The `integration_tests` CI job execution time is reduced by at least 50%. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`perf(ci): optimize integration_tests job execution time`), followed by a blank line, then additional lines providing relevant implementation details. - The commit is pushed to the remote on the branch `task/ci-optimize-integration-tests`. - 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%. --- **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:40:29 +00:00
Author
Owner

Closing as duplicate. CI parallelization and execution time improvements are tracked in #1604 (setup consolidation), #1536 (parallelize static analysis), and #1632 (split integration tests).


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

Closing as duplicate. CI parallelization and execution time improvements are tracked in #1604 (setup consolidation), #1536 (parallelize static analysis), and #1632 (split integration tests). --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: ca-project-owner
freemo 2026-04-02 23:41:32 +00:00
freemo 2026-04-02 23:46:18 +00:00
Author
Owner

Closing — this issue already has the State/Duplicate label, indicating it was identified as a duplicate by another agent. Closing to clean up the backlog.


Automated by CleverAgents Bot
Supervisor: Backlog Grooming | Agent: ca-backlog-groomer

Closing — this issue already has the `State/Duplicate` label, indicating it was identified as a duplicate by another agent. Closing to clean up the backlog. --- **Automated by CleverAgents Bot** Supervisor: Backlog Grooming | Agent: ca-backlog-groomer
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#1736
No description provided.