From 6ff11b02651b99f95a5e7fea73cca87dd6656bdb Mon Sep 17 00:00:00 2001 From: Matthew Feickert Date: Mon, 6 May 2024 18:58:57 -0500 Subject: [PATCH] ci: Use uv for all pip installs * 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. --- .github/workflows/ci.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4d5cc92..ab62acc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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/codecov-action@v4.3.0