Skip to content

Commit 8d6f70f

Browse files
fix: set UV_RESOLUTION=lowest-direct for tests to ensure consistency
Tests spawn uv run subprocesses which were re-resolving dependencies using the lockfile (anyio 4.10.0) instead of lowest-direct (anyio 4.5.0). Setting UV_RESOLUTION env var ensures all uv commands use the same resolution strategy.
1 parent 94907e6 commit 8d6f70f

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

.github/workflows/shared.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -101,20 +101,15 @@ jobs:
101101
shell: bash
102102
run: |
103103
if [ "${{ matrix.dep-resolution.name }}" == "lowest-direct" ]; then
104-
# Clean any stale .pyc files that might be causing issues
105-
find .venv -name "*.pyc" -delete 2>/dev/null || true
106-
find .venv -name "__pycache__" -type d -delete 2>/dev/null || true
104+
# Set UV_RESOLUTION so any uv run commands spawned by tests use lowest-direct
105+
export UV_RESOLUTION=lowest-direct
107106
108-
# Run pytest directly from venv to avoid any uv resolution issues
109-
# Disable xdist for lowest-direct to avoid subprocess issues
110-
# Isolate the Python environment completely
107+
# Run pytest with full parallelism restored
111108
export PYTHONNOUSERSITE=1
112-
export PYTHONPATH=""
113-
export PYTHONDONTWRITEBYTECODE=1
114109
if [ "$RUNNER_OS" == "Windows" ]; then
115-
.venv/Scripts/python -m pytest -n 0
110+
.venv/Scripts/python -m pytest
116111
else
117-
.venv/bin/python -m pytest -n 0
112+
.venv/bin/python -m pytest
118113
fi
119114
else
120115
uv run --frozen --no-sync pytest

0 commit comments

Comments
 (0)