Skip to content

Commit e63a99a

Browse files
committed
Use uv in move CI places
1 parent 36f8282 commit e63a99a

File tree

3 files changed

+17
-23
lines changed

3 files changed

+17
-23
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ jobs:
1818
strategy:
1919
matrix:
2020
python-version: ["3.12"]
21-
platform: [ubuntu-latest]
21+
platform: ["ubuntu-latest", "windows-latest"]
2222

2323
runs-on: ${{ matrix.platform }}
2424

2525
steps:
2626
- uses: actions/checkout@v4
2727

28-
- name: Install the latest version of uv
28+
- name: Install uv
2929
uses: astral-sh/setup-uv@v3
3030

3131
- name: Install Python

.github/workflows/release.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ jobs:
3131
# https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches
3232
token: ${{ secrets.RELEASE_PAT }}
3333

34-
# TODO use UV here
35-
- name: "Set up Python"
36-
uses: actions/setup-python@v5
37-
with:
38-
python-version: ${{ matrix.python-version }}
34+
- name: Install uv
35+
uses: astral-sh/setup-uv@v3
36+
37+
- name: Install Python
38+
run: uv python install ${{ matrix.python-version }}
3939

4040
- name: "Calver calculate version"
4141
uses: StephaneBour/actions-calver@master
@@ -78,12 +78,11 @@ jobs:
7878

7979
- name: Build a binary wheel and a source tarball
8080
run: |
81-
# Checkout the latest tag - the one we just created.
8281
git fetch --tags
8382
git checkout ${{ steps.tag_version.outputs.new_tag }}
84-
python -m pip install build check-wheel-contents
85-
python -m build --sdist --wheel --outdir dist/ .
86-
check-wheel-contents dist/*.whl
83+
uv run pip install build check-wheel-contents
84+
uv run python -m build --sdist --wheel --outdir dist/ .
85+
uv run check-wheel-contents dist/*.whl
8786
8887
# We use PyPI trusted publishing rather than a PyPI API token.
8988
# See https://github.com/pypa/gh-action-pypi-publish/tree/release/v1/?tab=readme-ov-file#trusted-publishing.

.github/workflows/windows-ci.yml

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -24,20 +24,15 @@ jobs:
2424

2525
steps:
2626
- uses: actions/checkout@v4
27-
- name: "Set up Python"
28-
uses: actions/setup-python@v5
29-
with:
30-
python-version: ${{ matrix.python-version }}
31-
32-
# TODO Here (or maybe get rid of this and use the ci yml?)
33-
# We do not use the cache action as uv is faster than the cache action.
34-
- name: "Install dependencies"
35-
run: |
36-
irm https://astral.sh/uv/install.ps1 | iex
37-
uv pip install --system --upgrade --editable .[dev]
27+
28+
- name: Install uv
29+
uses: astral-sh/setup-uv@v3
30+
31+
- name: Install Python
32+
run: uv python install ${{ matrix.python-version }}
3833

3934
- name: "Run tests"
4035
run: |
4136
# We run tests against "." and not the tests directory as we test the README
4237
# and documentation.
43-
python -m pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml
38+
uv run pytest -s -vvv --cov-fail-under 100 --cov=src/ --cov=tests . --cov-report=xml

0 commit comments

Comments
 (0)