Skip to content

Commit f341a46

Browse files
refactor: use --no-project flag instead of direct pytest execution
Instead of calling .venv/bin/pytest directly, use uv's --no-project flag which avoids discovering the project/workspace and lockfile entirely. This is cleaner and more cross-platform than the shell script approach, while achieving the same goal: ensuring lowest-direct tests use only the packages installed by --resolution lowest-direct without any interference from the lockfile. - lowest-direct: uv run --no-project --no-sync pytest - highest: uv run --frozen --no-sync pytest
1 parent f4259f2 commit f341a46

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

.github/workflows/shared.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,7 @@ jobs:
7777
uv run --frozen --no-sync python -c "from importlib.metadata import version; print('anyio version:', version('anyio'))" || echo "Failed with --frozen"
7878
7979
- name: Run pytest
80-
shell: bash
81-
run: |
82-
if [ "${{ matrix.dep-resolution.name }}" == "lowest-direct" ]; then
83-
.venv/bin/pytest
84-
else
85-
uv run --frozen --no-sync pytest
86-
fi
80+
run: uv run ${{ matrix.dep-resolution.name == 'lowest-direct' && '--no-project --no-sync' || '--frozen --no-sync' }} pytest
8781

8882
readme-snippets:
8983
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)