From 0f9ae903c3a23f50a4a2c36481bff12cdd400a46 Mon Sep 17 00:00:00 2001 From: Denys Fedoryshchenko Date: Mon, 31 Aug 2026 10:14:38 +0300 Subject: [PATCH] ci: target the matching tox environment Each CI matrix job installs one Python version, but invoking tox without an environment selector makes it evaluate every configured environment. The unavailable interpreters are then reported alongside the environment that actually ran: py312: FAIL py313: skipped because could not find python interpreter with spec(s): py313 py313: SKIP py314: skipped because could not find python interpreter with spec(s): py314 py314: SKIP evaluation failed :( This output is visible in the Python 3.12 job from PR #311: https://github.com/kernelci/kci-dev/actions/runs/33051625550/job/98448291347?pr=311 Add an explicit tox environment to each matrix entry and pass it to tox with -e. This preserves coverage for Python 3.12, 3.13, and 3.14 while ensuring every job runs only against the interpreter installed for it. Signed-off-by: Denys Fedoryshchenko --- .github/workflows/poetry.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/poetry.yml b/.github/workflows/poetry.yml index 1ee6674..84b163f 100644 --- a/.github/workflows/poetry.yml +++ b/.github/workflows/poetry.yml @@ -7,7 +7,13 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.12", "3.13", "3.14"] + include: + - python-version: "3.12" + tox-env: py312 + - python-version: "3.13" + tox-env: py313 + - python-version: "3.14" + tox-env: py314 steps: - uses: actions/checkout@v4 - name: Install Python ${{ matrix.python-version }} @@ -36,4 +42,4 @@ jobs: - name: Isort check run: poetry run isort . --profile black --check --diff - name: Tox check (pytest) - run: poetry run tox + run: poetry run tox -e ${{ matrix.tox-env }}