Skip to content

Commit 009d5e1

Browse files
authored
Port Python tests workflow to uv (#2129)
* Clean up tasks * Update precommit and run on files * Use uv for workflow
1 parent 2c723d6 commit 009d5e1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/python-test.yaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,21 @@ jobs:
2626
matrix:
2727
os: ["ubuntu-20.04", "windows-latest"]
2828
python_version: ["3.9", "3.10", "3.11", "3.12"]
29+
env:
30+
UV_SYSTEM_PYTHON: 1
2931
steps:
3032
- uses: actions/checkout@v4
3133
- name: Setup python
3234
uses: actions/setup-python@v5
3335
with:
3436
python-version: ${{ matrix.python_version }}
3537
architecture: x64
38+
- name: Install uv
39+
uses: astral-sh/setup-uv@v3
40+
with:
41+
enable-cache: true
42+
version: "0.4.20"
43+
cache-dependency-glob: "requirements**.txt"
3644
- name: Setup node
3745
uses: actions/setup-node@v4
3846
with:
@@ -44,8 +52,7 @@ jobs:
4452
npm run build
4553
- name: Install dependencies
4654
run: |
47-
python -m pip install --upgrade pip
48-
pip install -r requirements-dev.txt
55+
uv pip install -r requirements-dev.txt
4956
- name: Lint with ruff
5057
run: ruff check .
5158
- name: Check types with mypy

0 commit comments

Comments
 (0)