chore(ci): use matrix strategy for Python versions in unit and integration test jobs
CI / benchmark-publish (pull_request) Has been skipped
CI / lint (pull_request) Failing after 18s
CI / security (pull_request) Failing after 50s
CI / typecheck (pull_request) Failing after 59s
CI / coverage (pull_request) Has been skipped
CI / benchmark-regression (pull_request) Has been skipped
CI / build (pull_request) Successful in 29s
CI / unit_tests (3.13) (pull_request) Failing after 1m56s
CI / docker (pull_request) Has been skipped
CI / helm (pull_request) Successful in 24s
CI / quality (pull_request) Successful in 3m41s
CI / e2e_tests (pull_request) Failing after 14m39s
CI / integration_tests (3.13) (pull_request) Failing after 21m34s
CI / status-check (pull_request) Failing after 1s

Add a matrix strategy to the unit_tests and integration_tests jobs in
ci.yml so that tests run against all Python versions listed in
SUPPORTED_PYTHONS in noxfile.py (currently ["3.13"]).

Changes:
- Add strategy.matrix.python-version to unit_tests and integration_tests
- Set fail-fast: false so all matrix versions run even if one fails
- Use matrix.python-version in the container image tag
- Invoke nox with the versioned session name (e.g. unit_tests-3.13)
- Scope uv cache keys per Python version to avoid cross-version pollution
- Remove the now-unused global PYTHON_VERSION env var

When SUPPORTED_PYTHONS is extended in noxfile.py, only the matrix list
in ci.yml needs updating to add the new version.

ISSUES CLOSED: #1539
This commit is contained in:
2026-04-02 23:07:08 +00:00
parent 971d6a154d
commit a10639a68d
+16 -9
View File
@@ -8,7 +8,6 @@ on:
env:
UV_VERSION: "0.8.0"
PYTHON_VERSION: "3.13"
NOX_DEFAULT_VENV_BACKEND: "uv"
jobs:
@@ -142,8 +141,12 @@ jobs:
unit_tests:
runs-on: docker
strategy:
matrix:
python-version: ["3.13"]
fail-fast: false
container:
image: python:3.13-slim
image: python:${{ matrix.python-version }}-slim
steps:
- name: Install system dependencies (nodejs for checkout, git for merge tests, curl/tar for Helm)
run: |
@@ -172,20 +175,24 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/uv
key: uv-${{ hashFiles('pyproject.toml') }}
key: uv-tests-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
uv-
uv-tests-${{ matrix.python-version }}-
- name: Run unit tests via nox
run: |
nox -s unit_tests
nox -s "unit_tests-${{ matrix.python-version }}"
env:
NOX_DEFAULT_VENV_BACKEND: uv
integration_tests:
runs-on: docker
strategy:
matrix:
python-version: ["3.13"]
fail-fast: false
container:
image: python:3.13-slim
image: python:${{ matrix.python-version }}-slim
steps:
- name: Install system dependencies (nodejs for checkout, git for integration tests, curl/tar for Helm)
run: |
@@ -214,13 +221,13 @@ jobs:
uses: actions/cache@v3
with:
path: ~/.cache/uv
key: uv-${{ hashFiles('pyproject.toml') }}
key: uv-tests-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
uv-
uv-tests-${{ matrix.python-version }}-
- name: Run integration tests via nox
run: |
nox -s integration_tests
nox -s "integration_tests-${{ matrix.python-version }}"
env:
NOX_DEFAULT_VENV_BACKEND: uv
CLEVERAGENTS_REQUIRE_HELM_RENDER_ASSERTIONS: "true"