From 5f1925a14696d20a2f0d0287e9a965380753027f Mon Sep 17 00:00:00 2001 From: Davis Vann Bennett Date: Wed, 23 Sep 2026 20:21:55 +0200 Subject: [PATCH] fix(ci): run zarr-indexing tests on the matrix interpreter The test recipes call `uv run --project ../..` without --python, so uv honoured the root .python-version pin (3.12) and rebuilt the venv the sync step had created on 3.13/3.14. Both non-3.12 legs have run on 3.12 since #4222. Set UV_PYTHON at job level so every uv call inside the recipes uses the matrix interpreter, and add a step that fails if the interpreter drifts again. Closes #4384 Assisted-by: ClaudeCode:claude-opus-5-5 --- .github/workflows/zarr-indexing.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zarr-indexing.yml b/.github/workflows/zarr-indexing.yml index 9af8ed1e3d..e6869c46c1 100644 --- a/.github/workflows/zarr-indexing.yml +++ b/.github/workflows/zarr-indexing.yml @@ -31,6 +31,12 @@ jobs: fail-fast: false matrix: python-version: ['3.12', '3.13', '3.14'] + # The recipes run `uv run --project ../..`, which would otherwise honour + # the root .python-version pin and rebuild the venv on that interpreter. + # UV_PYTHON reaches every uv call inside them, keeping the justfile + # interpreter-agnostic for local use. + env: + UV_PYTHON: ${{ matrix.python-version }} steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: @@ -49,9 +55,15 @@ jobs: # The suite imports nothing from `zarr`; it runs against the repo-root # environment, with this package as an editable overlay, to share the # parent project's pinned test toolchain. The recipes carry that - # invocation; this step only fixes the interpreter the matrix asked for. + # invocation; this step installs dependencies up front so their + # install time is reported separately from the tests. - name: Sync test dependency group - run: uv sync --project ../.. --group test --python ${{ matrix.python-version }} + run: uv sync --project ../.. --group test + - name: Check interpreter + run: >- + uv run --project ../.. --group test python -c + "import sys; v = '%d.%d' % sys.version_info[:2]; + assert v == '${{ matrix.python-version }}', v" - name: Run pytest # Suites and invocation live in packages/zarr-indexing/justfile. run: just test