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 7, 2024
1 parent a78c3af commit 6ff11b0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,20 +64,22 @@ jobs:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- name: Install uv
run: python -m pip install --upgrade uv

- name: Install old NumPy
if: matrix.numpy-version != 'latest'
run: python -m pip install numpy==${{ matrix.numpy-version }}
run: 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
--durations=20
pytest -ra --cov --cov-report=xml --cov-report=term --durations=20
- name: Upload coverage report
uses: codecov/[email protected]

0 comments on commit 6ff11b0

Please sign in to comment.