Skip to content

Commit

Permalink
Use uv and deps lockfiles in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ml-evs committed Aug 20, 2024
1 parent baff653 commit 7fbabd7
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,20 @@ jobs:
with:
python-version: "3.10"

- name: Set up uv (latest)
run: curl -LsSf https://astral.sh/uv/install.sh | s

- name: Install dependencies
working-directory: ./pydatalab
run: |
python -m pip install --upgrade pip
pip install -U setuptools
pip install pipenv
pipenv sync --dev
pipenv run pip install -e .
uv venv
uv pip install -r requirements/requirements-all-dev.txt
uv pip install -e '.[all, dev]'
- name: Run pre-commit
working-directory: ./pydatalab
run: |
pipenv run pre-commit run --all-files --show-diff-on-failure
uv run pre-commit run --all-files --show-diff-on-failure
pytest:
name: Run Python unit tests
Expand Down Expand Up @@ -72,20 +73,20 @@ jobs:
run: |
wget https://fastdl.mongodb.org/tools/db/mongodb-database-tools-ubuntu2204-x86_64-100.9.0.deb && sudo apt install ./mongodb-database-tools-*-100.9.0.deb
- name: Install latest compatible versions of immediate dependencies
- name: Set up uv (latest)
run: curl -LsSf https://astral.sh/uv/install.sh | s

- name: Install locked versions of dependencies
working-directory: ./pydatalab
run: |
python -m pip install --upgrade pip
pip install -U setuptools
pip install pipenv
pipenv sync --dev
pipenv run pip install -e .
pipenv graph
uv venv
uv pip install -r requirements/requirements-all-dev.txt
uv pip install -e '.[all, dev]'
- name: Run all tests
working-directory: ./pydatalab
run: |
pipenv run pytest -rs -vvv --cov-report=term --cov-report=xml --cov ./pydatalab ./tests
uv run pytest -rs -vvv --cov-report=term --cov-report=xml --cov ./pydatalab ./tests
- name: Upload coverage to Codecov
if: matrix.python-version == '3.10' && github.repository == 'datalab-org/datalab'
Expand Down

0 comments on commit 7fbabd7

Please sign in to comment.