Skip to content

Commit 6d5cddb

Browse files
authored
ci(release): give the release job's tests a base interpreter, as compat already has (#200)
v1.5.1 tagged, failed, and deleted its own tag — the gate working. Every failure was in test/test_cli.py with the same cause: RuntimeError('Could not find a suitable base Python interpreter ... set the SYSTEM_PYTHON environment variable to point to a working Python interpreter that can create virtual environments.') The venv-building CLI tests run the analyzer, which provisions a virtualenv for the project under analysis, and inside uv's own venv the base-interpreter discovery walk has no anchor on a runner. The compat job directly above already sets SYSTEM_PYTHON and passes; the release job never did and fails. Same defect as python-sdk#332, and found the same way: by a tag deleting itself. The variable has to come from this job's own setup step. steps.py310 belongs to compat and would expand to an empty string here, and the two jobs use different interpreters deliberately — compat is 3.10, release is 3.12 because the framework integration tests are gated python_version >= '3.11'. So the setup step gains an id and the test step reads that. The path must be absolute: the override is checked with Path(...).exists() and never searches PATH, which setup-python's python-path output satisfies. Closes #199
1 parent de9c2ba commit 6d5cddb

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎.github/workflows/release.yml‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ jobs:
6161
# `importorskip` and the decorator-rule regression they exist to catch would
6262
# ship green. The `compat` job above keeps 3.10 covered.
6363
- name: Set up Python 3.12
64+
id: py312
6465
uses: actions/setup-python@v5
6566
with:
6667
python-version: '3.12'
@@ -99,6 +100,15 @@ jobs:
99100
id: test
100101
continue-on-error: true
101102
run: uv run pytest
103+
env:
104+
# Same reason as the `compat` job above, and it has to be repeated per job:
105+
# the venv-building CLI tests must find a base interpreter that can create
106+
# virtual environments, and inside uv's own venv the discovery walk has no
107+
# anchor on the runner. Must be this job's own setup step -- `steps.py310`
108+
# belongs to `compat` and would expand to an empty string here. Must be an
109+
# absolute path, because the override is checked with `Path(...).exists()`
110+
# and never searches PATH.
111+
SYSTEM_PYTHON: ${{ steps.py312.outputs.python-path }}
102112

103113
# MUST be `outcome`, not `conclusion`: continue-on-error rewrites `conclusion` to
104114
# `success`, so a `conclusion == 'failure'` guard never fires and a red test run

0 commit comments

Comments
 (0)