Skip to content

Commit 315fa25

Browse files
committed
CI: use uv where possible
1 parent d08b1c2 commit 315fa25

2 files changed

Lines changed: 33 additions & 33 deletions

File tree

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
ignore=E402,E741
33
builtins=buffer,unichr
44
max-line-length = 100
5-
exclude = build,.git
5+
exclude = build,.git,.venv
66
filename = *.py,*.pyi

.github/workflows/test.yml

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -82,44 +82,44 @@ jobs:
8282
run: |
8383
sudo apt-get update -q
8484
sudo apt-get install -y libcairo2-dev ninja-build
85-
pipx install poetry
85+
pipx install uv
8686
pipx install meson
87-
poetry install
87+
uv sync
8888
8989
- name: Install optional test dependencies
9090
if: ${{ !contains(matrix.python-version, 'pypy') && !contains(matrix.python-version, '3.14') }}
9191
run: |
92-
poetry install --with test-extras
92+
uv sync --group test-extras
9393
9494
- name: Build & Test with meson
9595
run: |
96-
poetry run meson setup --werror _build
97-
poetry run meson compile -C _build
98-
poetry run meson test -v -C _build
96+
uv run meson setup --werror _build
97+
uv run meson compile -C _build
98+
uv run meson test -v -C _build
9999
rm -Rf _build
100100
101-
- name: Build & Test with poetry
101+
- name: Build & Test with uv
102102
run: |
103103
export CFLAGS="-Werror -coverage"
104104
export PYTHONDEVMODE=1
105-
poetry run pip install --no-build-isolation -e .
106-
poetry run coverage run --branch -m pytest
107-
poetry run coverage xml -i
105+
uv pip install --no-build-isolation -e .
106+
uv run coverage run --branch -m pytest
107+
uv run coverage xml -i
108108
109109
- name: Upload coverage to Codecov
110110
uses: codecov/codecov-action@v5
111111

112112
- name: Run linters
113113
if: ${{ !contains(matrix.python-version, 'pypy') }}
114114
run: |
115-
poetry run flake8
116-
poetry run mypy .
115+
uv run flake8
116+
uv run mypy .
117117
118118
- name: Build docs
119119
if: ${{ !contains(matrix.python-version, 'pypy') }}
120120
run: |
121-
poetry install --with docs
122-
poetry run python -m sphinx -W -a -E -b html -n docs docs/_build
121+
uv sync --group docs
122+
uv run python -m sphinx -W -a -E -b html -n docs docs/_build
123123
124124
msvc:
125125
runs-on: ${{ matrix.os }}
@@ -161,9 +161,9 @@ jobs:
161161
162162
- name: Install dependencies
163163
run: |
164-
pipx install --python "${{ steps.setup-python.outputs.python-path }}" poetry
164+
pipx install --python "${{ steps.setup-python.outputs.python-path }}" uv
165165
pipx install --python "${{ steps.setup-python.outputs.python-path }}" meson
166-
poetry install
166+
uv sync
167167
168168
- name: Build & Test with meson
169169
env:
@@ -172,23 +172,23 @@ jobs:
172172
CFLAGS: "-DCAIRO_WIN32_STATIC_BUILD=1"
173173
run: |
174174
# XXX: pass python, so global python3 doesn't win
175-
poetry run meson setup -Dpython=python --werror _build
176-
poetry run meson compile -C _build
177-
poetry run meson test -v -C _build
175+
uv run meson setup -Dpython=python --werror _build
176+
uv run meson compile -C _build
177+
uv run meson test -v -C _build
178178
if (-not $?) { exit 1 }
179179
rm -r _build
180180
181-
- name: Build & Test with poetry
181+
- name: Build & Test with uv
182182
env:
183183
PKG_CONFIG: ${{ github.workspace }}/cairo-prebuild/bin/pkgconf.exe
184184
PKG_CONFIG_PATH: ${{ github.workspace }}/cairo-prebuild/lib/pkgconfig
185185
CFLAGS: "-DCAIRO_WIN32_STATIC_BUILD=1"
186186
PYTHONDEVMODE: 1
187187
run: |
188-
poetry run pip install --no-build-isolation -e .
189-
poetry run coverage run --branch -m pytest
188+
uv pip install --no-build-isolation -e .
189+
uv run coverage run --branch -m pytest
190190
if (-not $?) { exit 1 }
191-
poetry run coverage xml -i
191+
uv run coverage xml -i
192192
193193
- name: Upload coverage to Codecov
194194
uses: codecov/codecov-action@v5
@@ -202,23 +202,23 @@ jobs:
202202

203203
- name: Install dependencies
204204
run: |
205-
brew install pkg-config cairo python meson poetry ninja
206-
poetry install
205+
brew install pkg-config cairo python meson ninja uv
206+
uv sync
207207
208208
- name: Build & Test with meson
209209
run: |
210-
poetry run meson setup --werror _build
211-
poetry run meson compile -C _build
212-
poetry run meson test -v -C _build
210+
uv run meson setup --werror _build
211+
uv run meson compile -C _build
212+
uv run meson test -v -C _build
213213
rm -Rf _build
214214
215-
- name: Build & Test with poetry
215+
- name: Build & Test with uv
216216
run: |
217217
export CFLAGS="-Werror -coverage"
218218
export PYTHONDEVMODE=1
219-
poetry run pip install --no-build-isolation -e .
220-
poetry run coverage run --branch -m pytest
221-
poetry run coverage xml -i
219+
uv pip install --no-build-isolation -e .
220+
uv run coverage run --branch -m pytest
221+
uv run coverage xml -i
222222
223223
- name: Upload coverage to Codecov
224224
uses: codecov/codecov-action@v5

0 commit comments

Comments
 (0)