Skip to content

Commit a9bdf07

Browse files
committed
Use uv in github actions
1 parent 4c613d3 commit a9bdf07

File tree

4 files changed

+31
-27
lines changed

4 files changed

+31
-27
lines changed

.github/workflows/benchmark.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,14 @@ jobs:
1515
steps:
1616
- uses: actions/checkout@v5
1717

18-
- name: Set up Python 3.13
19-
uses: actions/setup-python@v6
20-
id: setup-python
18+
- name: Set up Python with uv
19+
uses: astral-sh/setup-uv@v6
2120
with:
2221
python-version: "3.13"
23-
architecture: x64
2422

2523
- name: Install tox
2624
run: |
27-
python -m pip install --upgrade pip
28-
python -m pip install tox tox-uv uv
25+
uv pip install --system tox tox-uv
2926
3027
- name: Run benchmarks with CodSpeed
3128
uses: CodSpeedHQ/action@v4

.github/workflows/lint.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,14 @@ jobs:
1010
steps:
1111
- uses: actions/checkout@v5
1212

13-
- name: Set up Python 3.13
14-
uses: actions/setup-python@v6
13+
- name: Set up Python with uv
14+
uses: astral-sh/setup-uv@v6
1515
with:
1616
python-version: '3.13'
1717

1818
- name: Install tox
1919
run: |
20-
python -m pip install --upgrade pip
21-
python -m pip install tox uv tox-uv
20+
uv pip install --system tox tox-uv
2221
2322
- name: Run code quality tests with tox
2423
run: tox

.github/workflows/publish.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,13 @@ jobs:
1313
steps:
1414
- uses: actions/checkout@v5
1515

16-
- name: Set up Python 3.13
17-
uses: actions/setup-python@v6
16+
- name: Set up Python with uv
17+
uses: astral-sh/setup-uv@v6
1818
with:
1919
python-version: '3.13'
2020

21-
- name: Build wheel and source tarball with uv_build
22-
run: |
23-
python -m pip install --upgrade pip
24-
python -m pip install uv_build
25-
python -m uv_build build
21+
- name: Build wheel and source tarball with uv
22+
run: uv build
2623
- name: Publish a Python distribution to PyPI
2724
uses: pypa/gh-action-pypi-publish@release/v1
2825
with:

.github/workflows/test.yml

Lines changed: 21 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,25 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v5
1616

17-
- name: Set up Python ${{ matrix.python-version }}
17+
- name: Set up CPython with uv
18+
if: ${{ !contains(matrix.python-version, 'pypy') }}
19+
uses: astral-sh/setup-uv@v6
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
23+
- name: Set up PyPy without uv
24+
if: ${{ contains(matrix.python-version, 'pypy') }}
1825
uses: actions/setup-python@v6
1926
with:
2027
python-version: ${{ matrix.python-version }}
2128

29+
- name: Set up uv for PyPy
30+
if: ${{ contains(matrix.python-version, 'pypy') }}
31+
uses: astral-sh/setup-uv@v6
32+
2233
- name: Install tox and plugins
2334
run: |
24-
python -m pip install tox tox-gh-actions tox-uv uv
35+
uv pip install --system tox tox-gh-actions tox-uv
2536
2637
- name: Run unit tests with tox
2738
run: tox
@@ -37,22 +48,22 @@ jobs:
3748
steps:
3849
- uses: actions/checkout@v5
3950

40-
- name: Set up Python 3.13 (tox runner)
51+
- name: Set up target Python ${{ matrix.python-version }} (for tox discovery)
4152
uses: actions/setup-python@v6
53+
with:
54+
python-version: ${{ matrix.python-version }}
55+
56+
- name: Set up Python 3.13 (tox runner) with uv
57+
uses: astral-sh/setup-uv@v6
4258
with:
4359
python-version: '3.13'
4460

4561
- name: Install tox and plugins (with Python 3.13)
4662
run: |
47-
python3.13 -m pip install tox tox-gh-actions tox-uv uv
48-
49-
- name: Set up target Python ${{ matrix.python-version }}
50-
uses: actions/setup-python@v6
51-
with:
52-
python-version: ${{ matrix.python-version }}
63+
uv pip install --system tox tox-gh-actions tox-uv
5364
5465
- name: Run unit tests with tox for target
5566
shell: bash
5667
run: |
5768
ENV="py${{ matrix.python-version }}"; ENV=${ENV/./}
58-
python3.13 -m tox -e "$ENV"
69+
python -m tox -e "$ENV"

0 commit comments

Comments
 (0)