Skip to content

Commit

Permalink
CI: replace pip with uv by Astral.sh (#952)
Browse files Browse the repository at this point in the history
Co-authored-by: Andrei-Aksionov <aksionau.andrei@gmail.com>
  • Loading branch information
2 people authored and rasbt committed Mar 18, 2024
1 parent b5742d3 commit 995f1a5
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions .github/workflows/cpu-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ defaults:

env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
UV_HTTP_TIMEOUT: 500

jobs:
cpu-tests:
Expand All @@ -33,20 +34,22 @@ jobs:
timeout-minutes: 25

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: 'pip'
cache-dependency-path: |
pyproject.toml

- name: Install uv
run: pip install uv

- name: Install minimal dependencies
run: |
pip install .
pip list
# uv pip install . is not yet supported, only `-e .`
# https://github.com/astral-sh/uv/issues/1896
uv pip install --system -e .
uv pip list
# make sure all modules are still importable with only the minimal dependencies available
modules=$(
find litgpt -type f -name "*.py" | \
Expand All @@ -58,8 +61,8 @@ jobs:
- name: Install all dependencies
run: |
pip install '.[all,test]'
pip list
uv pip install --system -e '.[all,test]'
uv pip list
- name: Run tests
run: |
Expand Down

0 comments on commit 995f1a5

Please sign in to comment.