From 7eabd68c5f19ad299eb677314be17985f410ee0a Mon Sep 17 00:00:00 2001 From: Fabian Joswig Date: Fri, 10 Jan 2025 09:36:05 +0100 Subject: [PATCH] [CI] Speed up test workflow install phase by using uv (#254) * [CI] Speed up install phase by using uv * [CI] Use uv in examples workflow * [CI] Fix yml syntax * [CI] Install uv into system env * [CI] Add system install for examples workflow --- .github/workflows/examples.yml | 12 ++++++------ .github/workflows/pytest.yml | 14 ++++++-------- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index b8220691..51322b2c 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -27,17 +27,17 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: uv + uses: astral-sh/setup-uv@v5 - name: Install run: | sudo apt-get update sudo apt-get install dvipng texlive-latex-extra texlive-fonts-recommended cm-super - python -m pip install --upgrade pip - pip install wheel - pip install . - pip install pytest - pip install nbmake - pip install -U matplotlib!=3.7.0 # Exclude version 3.7.0 of matplotlib as this breaks local imports of style files. + uv pip install wheel --system + uv pip install . --system + uv pip install pytest nbmake --system + uv pip install -U matplotlib!=3.7.0 --system # Exclude version 3.7.0 of matplotlib as this breaks local imports of style files. - name: Run tests run: pytest -vv --nbmake examples/*.ipynb diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 36981809..ff5d8223 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -30,17 +30,15 @@ jobs: uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} + - name: uv + uses: astral-sh/setup-uv@v5 - name: Install run: | - python -m pip install --upgrade pip - pip install wheel - pip install . - pip install pytest - pip install pytest-cov - pip install pytest-benchmark - pip install hypothesis - pip freeze + uv pip install wheel --system + uv pip install . --system + uv pip install pytest pytest-cov pytest-benchmark hypothesis --system + uv pip freeze --system - name: Run tests run: pytest --cov=pyerrors -vv