From 502967437ed1bb380eb4514c779cb8b3fd14e73c Mon Sep 17 00:00:00 2001 From: Tim Jenness Date: Tue, 20 Feb 2024 14:57:05 -0700 Subject: [PATCH] Use uv for pip install --- .github/workflows/build.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index c834061a..9d08708e 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -28,18 +28,25 @@ jobs: with: python-version: ${{ matrix.python-version }} - - name: Install packages + - name: Install debian packages run: sudo apt-get install graphviz + - name: Set the VIRTUAL_ENV variable for uv to work + run: | + echo "VIRTUAL_ENV=${Python_ROOT_DIR}" >> $GITHUB_ENV + + - name: Install uv + run: pip install uv + # We have two cores so we can speed up the testing with xdist - name: Install xdist and openfiles - run: pip install pytest-xdist pytest-openfiles pytest-cov + run: uv pip install pytest-xdist pytest-openfiles pytest-cov - name: Install dependencies - run: pip install -r requirements.txt + run: uv pip install -r requirements.txt - name: Build and install - run: pip install -v . + run: uv pip install -v . - name: Run tests run: pytest -r a -v -n 3 --open-files --cov=astro_metadata_translator --cov=tests --cov-report=xml --cov-report=term --cov-branch @@ -50,7 +57,7 @@ jobs: files: ./coverage.xml - name: Install documenteer - run: pip install -r doc/requirements.txt + run: uv pip install -r doc/requirements.txt - name: Build documentation if: ${{ matrix.python-version == '3.10' }}