TEST-INFRA: [ci-pipeline-design] Introduce a matrix strategy for testing against multiple Python versions #1887

Open
opened 2026-04-03 00:06:35 +00:00 by freemo · 1 comment
Owner

Metadata

  • Branch: chore/ci-matrix-python-versions
  • Commit Message: chore(ci): introduce matrix strategy for multi-Python-version testing
  • Milestone: v3.8.0
  • Parent Epic: #1678

Background and Context

The current CI pipeline in .forgejo/workflows/ci.yml is hardcoded to run against a single Python version (3.13). This is not ideal as it does not ensure that the code is compatible with other supported Python versions. A matrix strategy should be used to test against multiple Python versions to guarantee broad compatibility and catch version-specific regressions early.

Expected Behavior

The CI pipeline should run all jobs against a matrix of supported Python versions, ensuring that the codebase is validated across each version on every push or pull request.

Acceptance Criteria

  • A matrix strategy is defined in .forgejo/workflows/ci.yml specifying all supported Python versions.
  • All relevant CI jobs reference ${{ matrix.python-version }} instead of a hardcoded version string.
  • The pipeline successfully executes a separate job set for each Python version in the matrix.
  • No regressions are introduced to existing CI behaviour.

Subtasks

  • Identify the supported Python versions for the project (check pyproject.toml / noxfile.py)
  • Define a matrix block in .forgejo/workflows/ci.yml with the identified Python versions
  • Update all jobs that install or invoke Python to use ${{ matrix.python-version }}
  • Verify the pipeline triggers and passes for every version in the matrix
  • Update documentation / comments in the workflow file to reflect the matrix approach
  • Run nox (all default sessions) locally against each version; fix any errors
  • Verify coverage >= 97% via nox -s coverage_report

Definition of Done

This issue is complete when:

  • All subtasks above are completed and checked off.
  • A matrix of Python versions is defined in .forgejo/workflows/ci.yml.
  • All jobs use ${{ matrix.python-version }} — no hardcoded version strings remain.
  • The CI pipeline successfully runs for all Python versions in the matrix.
  • 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%.

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

## Metadata - **Branch**: `chore/ci-matrix-python-versions` - **Commit Message**: `chore(ci): introduce matrix strategy for multi-Python-version testing` - **Milestone**: v3.8.0 - **Parent Epic**: #1678 ## Background and Context The current CI pipeline in `.forgejo/workflows/ci.yml` is hardcoded to run against a single Python version (3.13). This is not ideal as it does not ensure that the code is compatible with other supported Python versions. A matrix strategy should be used to test against multiple Python versions to guarantee broad compatibility and catch version-specific regressions early. ## Expected Behavior The CI pipeline should run all jobs against a matrix of supported Python versions, ensuring that the codebase is validated across each version on every push or pull request. ## Acceptance Criteria - A `matrix` strategy is defined in `.forgejo/workflows/ci.yml` specifying all supported Python versions. - All relevant CI jobs reference `${{ matrix.python-version }}` instead of a hardcoded version string. - The pipeline successfully executes a separate job set for each Python version in the matrix. - No regressions are introduced to existing CI behaviour. ## Subtasks - [ ] Identify the supported Python versions for the project (check `pyproject.toml` / `noxfile.py`) - [ ] Define a `matrix` block in `.forgejo/workflows/ci.yml` with the identified Python versions - [ ] Update all jobs that install or invoke Python to use `${{ matrix.python-version }}` - [ ] Verify the pipeline triggers and passes for every version in the matrix - [ ] Update documentation / comments in the workflow file to reflect the matrix approach - [ ] Run `nox` (all default sessions) locally against each version; fix any errors - [ ] Verify coverage >= 97% via `nox -s coverage_report` ## Definition of Done This issue is complete when: - [ ] All subtasks above are completed and checked off. - [ ] A matrix of Python versions is defined in `.forgejo/workflows/ci.yml`. - [ ] All jobs use `${{ matrix.python-version }}` — no hardcoded version strings remain. - [ ] The CI pipeline successfully runs for all Python versions in the matrix. - [ ] 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%. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: ca-new-issue-creator
freemo added this to the v3.8.0 milestone 2026-04-03 00:06:58 +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#1887
No description provided.