Skip to content

Commit d83c35c

Browse files
committed
ci: use uv in place of pip to speed up installing dependencies
1 parent 116d087 commit d83c35c

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ defaults:
55
run:
66
shell: bash
77

8+
env:
9+
# https://docs.astral.sh/uv/guides/integration/github/#using-uv-pip
10+
UV_SYSTEM_PYTHON: 1
11+
812
jobs:
913
unit-tests:
1014
name: "Unit Tests"
@@ -40,17 +44,16 @@ jobs:
4044
with:
4145
python-version: ${{ matrix.python-version }}
4246

43-
- name: Upgrade pip
44-
run: |
45-
python -m pip install -U pip
47+
- name: Install uv
48+
uses: astral-sh/setup-uv@v5
4649

4750
- name: Configure environments
4851
run: |
4952
python --version
5053
5154
- name: Install dependencies
5255
run: |
53-
pip install -e ".[test]"
56+
uv pip install -e ".[test]"
5457
python -m imgcat --version
5558
5659
- name: Run tests

setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ def read_version():
2828

2929
tests_requires = [
3030
'pytest',
31-
'numpy',
32-
'torch',
33-
'tensorflow>=2.0',
31+
'numpy>=1.21,<2.0',
32+
'torch>=2.0,<3.0; python_version >= "3.8"',
33+
'tensorflow>=2.0,<3.0; python_version >=3.8"',
3434
'matplotlib>=3.3',
3535
'Pillow',
3636
]

0 commit comments

Comments
 (0)