Skip to content

Commit

Permalink
ci: Use uv for all pip installs
Browse files Browse the repository at this point in the history
* Use 'uv pip' for all calls to 'pip install' in CI workflows.
   - c.f. https://github.com/astral-sh/uv/
* Use 'pytest' over 'python -m pytest' as calling pytest as a main
  module also includes the current directory on the path.
  • Loading branch information
matthewfeickert committed May 6, 2024
1 parent f78ea7d commit 697c6cc
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,19 @@ jobs:

- name: Install old NumPy
if: matrix.numpy-version != 'latest'
run: python -m pip install numpy==${{ matrix.numpy-version }}
run: |
python -m pip install --upgrade uv
uv pip install --system numpy==${{ matrix.numpy-version }}
- name: Install package
run: python -m pip install .[test]
run: uv pip install --system '.[test]'

- name: Print NumPy version
run: python -c 'import numpy as np; print(np.__version__)'

- name: Test package
run: >-
python -m pytest -ra --cov --cov-report=xml --cov-report=term
pytest -ra --cov --cov-report=xml --cov-report=term
--durations=20
- name: Upload coverage report
Expand Down

0 comments on commit 697c6cc

Please sign in to comment.