Skip to content

Commit 0c637cc

Browse files
committed
ci: select Python with setup-uv
1 parent 116d496 commit 0c637cc

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

‎.github/workflows/tests.yaml‎

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212

1313
env:
1414
UV_LOCKED: 1
15+
UV_PYTHON_PREFERENCE: only-managed
1516

1617
permissions:
1718
contents: read
@@ -34,9 +35,8 @@ jobs:
3435
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
3536
with:
3637
version: "0.12.13"
38+
python-version: ${{ matrix.python }}
3739
enable-cache: true
38-
- name: Install Python ${{ matrix.python }}
39-
run: uv python install ${{ matrix.python }}
4040
- name: Run tests
4141
run: uv run pytest --showlocals
4242

@@ -48,11 +48,10 @@ jobs:
4848
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
4949
with:
5050
version: "0.12.13"
51+
python-version: "3.14"
5152
enable-cache: true
52-
- name: Install Python 3.14
53-
run: uv python install 3.14
5453
- name: Run tests
55-
run: uv run --python 3.14 pytest --cov --cov-fail-under=100
54+
run: uv run pytest --cov --cov-fail-under=100
5655

5756
downstream-tests:
5857
name: py${{ matrix.python }} ${{ matrix.downstream }} downstream unit tests
@@ -78,16 +77,13 @@ jobs:
7877
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
7978
with:
8079
version: "0.12.13"
80+
python-version: ${{ matrix.python }}
8181
enable-cache: true
8282
- name: Checkout downstream pyproject
8383
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
8484
with:
8585
repository: python-scim/${{ matrix.downstream }}
8686
path: ${{ matrix.downstream }}
87-
- name: Install Python ${{ matrix.python }}
88-
run: |
89-
cd ${{ matrix.downstream }}
90-
uv python install ${{ matrix.python }}
9187
- name: Install downstream test environment
9288
run: |
9389
cd ${{ matrix.downstream }}
@@ -110,6 +106,7 @@ jobs:
110106
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
111107
with:
112108
version: "0.12.13"
109+
python-version: "3.11"
113110
enable-cache: true
114111
- name: Install minimum dependencies
115112
run: uv sync
@@ -124,9 +121,10 @@ jobs:
124121
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
125122
with:
126123
version: "0.12.13"
124+
python-version: "3.14"
127125
enable-cache: true
128126
- name: Run style checks
129-
run: uv run --python 3.14 prek run --all-files --show-diff-on-failure
127+
run: uv run prek run --all-files --show-diff-on-failure
130128

131129
doc:
132130
runs-on: ubuntu-24.04
@@ -136,7 +134,8 @@ jobs:
136134
uses: astral-sh/setup-uv@20cfd1bf945f4377ade1205e4dbc17946fc9a30d # v10.0.1
137135
with:
138136
version: "0.12.13"
137+
python-version: "3.14"
139138
enable-cache: true
140139
- name: Install dependencies
141-
run: uv sync --python 3.14 --group doc
140+
run: uv sync --group doc
142141
- run: uv run sphinx-build -W --keep-going -b html doc build/sphinx/html

0 commit comments

Comments
 (0)