Skip to content

Commit 193d00e

Browse files
committed
CI: install into uv venv instead of system python
1 parent 4fc4657 commit 193d00e

1 file changed

Lines changed: 6 additions & 7 deletions

File tree

‎.github/workflows/test.yml‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,8 @@ jobs:
2828
python: ["3.10", 3.11, 3.12, 3.13]
2929

3030
env:
31-
# use system python for uv
32-
UV_SYSTEM_PYTHON: 1
33-
# force uv-managed Python: runner system Pythons are PEP 668
34-
# externally-managed, so `uv pip install` refuses them
35-
UV_PYTHON_PREFERENCE: only-managed
31+
# UV_PYTHON is set by setup-uv from the matrix; all uv commands below
32+
# use it (e.g. `uv venv` builds the venv from that interpreter)
3633

3734
# Steps represent a sequence of tasks that will be executed as part of the job
3835
steps:
@@ -46,10 +43,12 @@ jobs:
4643
python-version: ${{ matrix.python }}
4744

4845
- name: Install package
49-
run: uv pip install .[dev]
46+
run: |
47+
uv venv
48+
uv pip install .[dev]
5049
5150
- name: Run tests
52-
run: uv run pytest -n auto --ignore=docs/tutorials/optimal_ctrl.ipynb
51+
run: uv run --no-sync pytest -n auto --ignore=docs/tutorials/optimal_ctrl.ipynb
5352

5453
# - name: Setup tmate session # for optional debugging
5554
# uses: mxschmitt/action-tmate@v3

0 commit comments

Comments
 (0)