From ce8c76921992460c80e122c8df580bf962ea0fbe Mon Sep 17 00:00:00 2001 From: CJ Steiner Date: Mon, 6 Jan 2025 15:47:18 -0600 Subject: [PATCH] ci: update pip install to use uv --- .github/workflows/ci.yml | 13 ++++++++----- .github/workflows/pypi.yml | 24 +++++++++++++++--------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 404ff986c..735ff781b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,11 +24,14 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - cache: 'pip' - cache-dependency-path: | - '../**/requirements*.txt' - '../**/setup.py' - - run: python -m pip install --upgrade setuptools pip tox virtualenv + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + enable-cache: true + cache-dependency-glob: | + **/setup.py + **/requirements*.txt + - run: uv pip install --upgrade setuptools pip tox virtualenv # Run tox only for the installed py version on the runner as outlined in the python matrix # Ensures the correct py version is installed and tested as opposed to 'tox' which attempts to run for all py versions in tox.ini - run: tox -e py diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index d66744b6f..ff1604f94 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -20,11 +20,14 @@ jobs: - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python }} - cache: 'pip' - cache-dependency-path: | - '../**/requirements*.txt' - '../**/setup.py' - - run: python -m pip install --upgrade setuptools pip tox virtualenv + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + enable-cache: true + cache-dependency-glob: | + **/setup.py + **/requirements*.txt + - run: uv pip install --upgrade --system setuptools pip tox virtualenv # Run tox only for the installed py version on the runner as outlined in the python matrix # Ensures the correct py version is installed and tested as opposed to 'tox' which attempts to run for all py versions in tox.ini - run: tox -e py @@ -40,10 +43,13 @@ jobs: uses: actions/setup-python@v5 with: python-version: 3.13 - cache: 'pip' - cache-dependency-path: | - '../**/requirements*.txt' - '../**/setup.py' + - name: Install uv + uses: astral-sh/setup-uv@v4 + with: + enable-cache: true + cache-dependency-glob: | + **/setup.py + **/requirements*.txt - name: Install dependencies run: pip install wheel - name: Build package