Skip to content

Commit 941698a

Browse files
ci: update pip install to use uv
1 parent c47186b commit 941698a

File tree

2 files changed

+24
-15
lines changed

2 files changed

+24
-15
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ jobs:
2424
- uses: actions/setup-python@v5
2525
with:
2626
python-version: ${{ matrix.python }}
27-
cache: 'pip'
28-
cache-dependency-path: |
29-
'../**/requirements*.txt'
30-
'../**/setup.py'
31-
- run: python -m pip install --upgrade setuptools pip tox virtualenv
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v4
29+
with:
30+
enable-cache: true
31+
cache-dependency-glob: |
32+
**/setup.py
33+
**/requirements*.txt
34+
- run: uv pip install --upgrade --system setuptools pip tox virtualenv
3235
# Run tox only for the installed py version on the runner as outlined in the python matrix
3336
# Ensures the correct py version is installed and tested as opposed to 'tox' which attempts to run for all py versions in tox.ini
3437
- run: tox -e py

.github/workflows/pypi.yml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,14 @@ jobs:
2020
- uses: actions/setup-python@v5
2121
with:
2222
python-version: ${{ matrix.python }}
23-
cache: 'pip'
24-
cache-dependency-path: |
25-
'../**/requirements*.txt'
26-
'../**/setup.py'
27-
- run: python -m pip install --upgrade setuptools pip tox virtualenv
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v4
25+
with:
26+
enable-cache: true
27+
cache-dependency-glob: |
28+
**/setup.py
29+
**/requirements*.txt
30+
- run: uv pip install --upgrade --system setuptools pip tox virtualenv
2831
# Run tox only for the installed py version on the runner as outlined in the python matrix
2932
# Ensures the correct py version is installed and tested as opposed to 'tox' which attempts to run for all py versions in tox.ini
3033
- run: tox -e py
@@ -40,12 +43,15 @@ jobs:
4043
uses: actions/setup-python@v5
4144
with:
4245
python-version: 3.13
43-
cache: 'pip'
44-
cache-dependency-path: |
45-
'../**/requirements*.txt'
46-
'../**/setup.py'
46+
- name: Install uv
47+
uses: astral-sh/setup-uv@v4
48+
with:
49+
enable-cache: true
50+
cache-dependency-glob: |
51+
**/setup.py
52+
**/requirements*.txt
4753
- name: Install dependencies
48-
run: pip install wheel
54+
run: uv pip --system --upgrade install wheel
4955
- name: Build package
5056
run: python setup.py sdist bdist_wheel
5157
- name: Publish package

0 commit comments

Comments
 (0)