Skip to content

Commit f77fc10

Browse files
refactor: simplify pytest execution to match PR #1325 approach
Use uv run consistently for both resolution strategies, just setting UV_RESOLUTION env var for lowest-direct to ensure test subprocesses use the same resolution strategy.
1 parent 8777c64 commit f77fc10

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

.github/workflows/shared.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,9 @@ jobs:
5757
run: uv sync ${{ matrix.dep-resolution.install-flags }} --all-extras --python ${{ matrix.python-version }}
5858

5959
- name: Run pytest
60-
shell: bash
61-
run: |
62-
if [ "${{ matrix.dep-resolution.name }}" == "lowest-direct" ]; then
63-
# Set UV_RESOLUTION so any uv run commands spawned by tests use lowest-direct
64-
export UV_RESOLUTION=lowest-direct
65-
66-
# Run pytest with full parallelism restored
67-
export PYTHONNOUSERSITE=1
68-
if [ "$RUNNER_OS" == "Windows" ]; then
69-
.venv/Scripts/python -m pytest
70-
else
71-
.venv/bin/python -m pytest
72-
fi
73-
else
74-
uv run --frozen --no-sync pytest
75-
fi
60+
run: uv run ${{ matrix.dep-resolution.install-flags }} --no-sync pytest
61+
env:
62+
UV_RESOLUTION: ${{ matrix.dep-resolution.name == 'lowest-direct' && 'lowest-direct' || '' }}
7663

7764
readme-snippets:
7865
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)