TEST-INFRA: [ci-pipeline-design] Use matrix strategy for tests #1750

Open
opened 2026-04-02 23:41:20 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: chore/ci-matrix-strategy-python-versions
  • Commit Message: chore(ci): add matrix strategy for unit and integration test jobs
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The unit_tests and integration_tests jobs in the .forgejo/workflows/ci.yml workflow currently run on a single Python version (3.13). A matrix strategy would allow these jobs to run on multiple Python versions simultaneously, ensuring broader compatibility and catching version-specific regressions early in the CI pipeline.

Expected Behavior

The unit_tests and integration_tests jobs should use a strategy.matrix block to run on Python 3.13 and 3.12. The status-check job must be updated to correctly aggregate results from the matrix jobs.

Acceptance Criteria

  • The unit_tests job runs on both Python 3.13 and 3.12 via a matrix strategy.
  • The integration_tests job runs on both Python 3.13 and 3.12 via a matrix strategy.
  • The status-check job correctly handles the matrix-expanded job names and passes only when all matrix variants succeed.
  • The CI pipeline passes end-to-end for both Python versions.

Subtasks

  • Update the unit_tests job in .forgejo/workflows/ci.yml to use strategy.matrix with Python versions ["3.13", "3.12"]
  • Update the integration_tests job in .forgejo/workflows/ci.yml to use strategy.matrix with Python versions ["3.13", "3.12"]
  • Update the status-check job's needs: list and success conditions to correctly handle the matrix-expanded job names
  • Update features/ci_workflow_validation.feature to assert the matrix strategy is present for both test jobs
  • Verify all nox stages pass after changes
  • Confirm coverage ≥ 97%
  • Run nox (all default sessions), fix any errors

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • The unit_tests and integration_tests jobs are run on Python 3.13 and 3.12 via a matrix strategy.
  • The status-check job correctly handles the matrix jobs.
  • The CI pipeline passes for both Python versions.
  • A Git commit is created where the first line of the commit message matches the Commit Message in Metadata exactly (chore(ci): add matrix strategy for unit and integration test jobs), 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 (chore/ci-matrix-strategy-python-versions).
  • 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**: `chore/ci-matrix-strategy-python-versions` - **Commit Message**: `chore(ci): add matrix strategy for unit and integration test jobs` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The `unit_tests` and `integration_tests` jobs in the `.forgejo/workflows/ci.yml` workflow currently run on a single Python version (3.13). A matrix strategy would allow these jobs to run on multiple Python versions simultaneously, ensuring broader compatibility and catching version-specific regressions early in the CI pipeline. ## Expected Behavior The `unit_tests` and `integration_tests` jobs should use a `strategy.matrix` block to run on Python 3.13 and 3.12. The `status-check` job must be updated to correctly aggregate results from the matrix jobs. ## Acceptance Criteria - The `unit_tests` job runs on both Python 3.13 and 3.12 via a matrix strategy. - The `integration_tests` job runs on both Python 3.13 and 3.12 via a matrix strategy. - The `status-check` job correctly handles the matrix-expanded job names and passes only when all matrix variants succeed. - The CI pipeline passes end-to-end for both Python versions. ## Subtasks - [ ] Update the `unit_tests` job in `.forgejo/workflows/ci.yml` to use `strategy.matrix` with Python versions `["3.13", "3.12"]` - [ ] Update the `integration_tests` job in `.forgejo/workflows/ci.yml` to use `strategy.matrix` with Python versions `["3.13", "3.12"]` - [ ] Update the `status-check` job's `needs:` list and success conditions to correctly handle the matrix-expanded job names - [ ] Update `features/ci_workflow_validation.feature` to assert the matrix strategy is present for both test jobs - [ ] Verify all nox stages pass after changes - [ ] Confirm coverage ≥ 97% - [ ] Run `nox` (all default sessions), fix any errors ## Definition of Done This issue is complete when: - All subtasks above are completed and checked off. - The `unit_tests` and `integration_tests` jobs are run on Python 3.13 and 3.12 via a matrix strategy. - The `status-check` job correctly handles the matrix jobs. - The CI pipeline passes for both Python versions. - A Git commit is created where the **first line** of the commit message matches the Commit Message in Metadata exactly (`chore(ci): add matrix strategy for unit and integration test jobs`), 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 (`chore/ci-matrix-strategy-python-versions`). - 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:42:00 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • MoSCoW: MoSCoW/Could Have — CI/test infrastructure improvement.

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

Issue triaged by project owner: - **State**: Verified - **MoSCoW**: MoSCoW/Could Have — CI/test infrastructure improvement. --- **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#1750
No description provided.