TEST-INFRA: [ci-pipeline-design] Introduce matrix build for multiple Python versions #5437

Open
opened 2026-04-09 06:49:43 +00:00 by HAL9000 · 0 comments
Owner

Metadata

  • Branch: test/ci-pipeline-design-matrix-build-python-versions
  • Commit Message: ci(pipeline): introduce matrix build strategy for multiple Python version testing
  • Milestone: Backlog (no milestone — see backlog note below)
  • Parent Epic: #5407

Overview

The noxfile.py currently defines SUPPORTED_PYTHONS = ["3.13"], indicating that the project may support multiple Python versions in the future. To prepare for this, we should introduce a matrix build strategy in our CI pipeline.

A matrix build will allow us to test against multiple Python versions in parallel, ensuring that our code remains compatible as we expand our support.

Proposed Changes

Modify the .forgejo/workflows/ci.yml file to use a matrix strategy for the unit_tests, integration_tests, and e2e_tests jobs. This will involve:

  1. Defining a python-version matrix with a list of supported Python versions.
  2. Updating the job steps to use the matrix.python-version variable to install and use the correct Python version.

Example

jobs:
  unit_tests:
    runs-on: docker
    strategy:
      matrix:
        python-version: [3.12, 3.13]
    container:
      image: python:${{ matrix.python-version }}-slim
    steps:
      - uses: actions/checkout@v4
      - name: Set up Python ${{ matrix.python-version }}
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python-version }}
      # ... rest of the steps

Duplicate Check

  • Search Queries: matrix, python, version
  • Results: 0 issues found.
  • Conclusion: This is not a duplicate issue.

Subtasks

  • Review current .forgejo/workflows/ci.yml structure and identify jobs to update
  • Update noxfile.py SUPPORTED_PYTHONS list to include additional Python versions (e.g., 3.12)
  • Add strategy.matrix block to unit_tests CI job with python-version list
  • Add strategy.matrix block to integration_tests CI job with python-version list
  • Add strategy.matrix block to e2e_tests CI job with python-version list
  • Update container image references to use matrix.python-version
  • Verify all matrix jobs pass in CI for each Python version
  • Update documentation if needed

Definition of Done

  • .forgejo/workflows/ci.yml uses matrix strategy for test jobs
  • CI runs tests against all specified Python versions in parallel
  • All matrix job combinations pass CI successfully
  • noxfile.py SUPPORTED_PYTHONS reflects the tested versions
  • All nox stages pass
  • Coverage >= 97%
  • PR is reviewed and merged

Backlog note: This issue was discovered during autonomous operation
on milestone v3.7.0. It does not block milestone completion and has been
placed in the backlog for human review and future milestone assignment.


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

## Metadata - **Branch**: `test/ci-pipeline-design-matrix-build-python-versions` - **Commit Message**: `ci(pipeline): introduce matrix build strategy for multiple Python version testing` - **Milestone**: Backlog (no milestone — see backlog note below) - **Parent Epic**: #5407 ## Overview The `noxfile.py` currently defines `SUPPORTED_PYTHONS = ["3.13"]`, indicating that the project may support multiple Python versions in the future. To prepare for this, we should introduce a matrix build strategy in our CI pipeline. A matrix build will allow us to test against multiple Python versions in parallel, ensuring that our code remains compatible as we expand our support. ## Proposed Changes Modify the `.forgejo/workflows/ci.yml` file to use a `matrix` strategy for the `unit_tests`, `integration_tests`, and `e2e_tests` jobs. This will involve: 1. Defining a `python-version` matrix with a list of supported Python versions. 2. Updating the job steps to use the `matrix.python-version` variable to install and use the correct Python version. ## Example ```yaml jobs: unit_tests: runs-on: docker strategy: matrix: python-version: [3.12, 3.13] container: image: python:${{ matrix.python-version }}-slim steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} # ... rest of the steps ``` ## Duplicate Check - **Search Queries**: `matrix`, `python`, `version` - **Results**: 0 issues found. - **Conclusion**: This is not a duplicate issue. ## Subtasks - [ ] Review current `.forgejo/workflows/ci.yml` structure and identify jobs to update - [ ] Update `noxfile.py` `SUPPORTED_PYTHONS` list to include additional Python versions (e.g., 3.12) - [ ] Add `strategy.matrix` block to `unit_tests` CI job with `python-version` list - [ ] Add `strategy.matrix` block to `integration_tests` CI job with `python-version` list - [ ] Add `strategy.matrix` block to `e2e_tests` CI job with `python-version` list - [ ] Update container image references to use `matrix.python-version` - [ ] Verify all matrix jobs pass in CI for each Python version - [ ] Update documentation if needed ## Definition of Done - [ ] `.forgejo/workflows/ci.yml` uses matrix strategy for test jobs - [ ] CI runs tests against all specified Python versions in parallel - [ ] All matrix job combinations pass CI successfully - [ ] `noxfile.py` `SUPPORTED_PYTHONS` reflects the tested versions - [ ] All nox stages pass - [ ] Coverage >= 97% - [ ] PR is reviewed and merged > **Backlog note:** This issue was discovered during autonomous operation > on milestone v3.7.0. It does not block milestone completion and has been > placed in the backlog for human review and future milestone assignment. --- **Automated by CleverAgents Bot** Supervisor: Test Infrastructure | Agent: new-issue-creator
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#5437
No description provided.