Skip to content

Commit 2860d86

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

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 7 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"
@@ -35,22 +39,18 @@ jobs:
3539
steps:
3640
- uses: actions/checkout@v2
3741

38-
- name: Set up Python ${{ matrix.python-version }}
39-
uses: actions/setup-python@v2
42+
- name: Install uv and set up python
43+
uses: astral-sh/setup-uv@v5
4044
with:
4145
python-version: ${{ matrix.python-version }}
4246

43-
- name: Upgrade pip
44-
run: |
45-
python -m pip install -U pip
46-
4747
- name: Configure environments
4848
run: |
4949
python --version
5050
5151
- name: Install dependencies
5252
run: |
53-
pip install -e ".[test]"
53+
uv pip install -e ".[test]" --verbose
5454
python -m imgcat --version
5555
5656
- 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)