From bab169eca9b17211f2bb3503853a4d3f62e18cb1 Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Sat, 25 Jul 2026 08:32:30 +0200 Subject: [PATCH 1/2] Manage the CI Python interpreter with uv --- .github/actions/setup-python/action.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/actions/setup-python/action.yml b/.github/actions/setup-python/action.yml index 47c3fb6a..1a13c016 100644 --- a/.github/actions/setup-python/action.yml +++ b/.github/actions/setup-python/action.yml @@ -13,18 +13,20 @@ inputs: runs: using: composite steps: - - uses: actions/setup-python@v5 - with: - python-version: "${{ inputs.python-version }}" - - # Install uv and enable its built-in cache. The cache key takes the - # platform, the uv version, and a hash of the files below into account. + # Install uv together with a uv-managed Python interpreter, and + # create and activate a virtual environment that is used by all + # subsequent steps (e.g. the `uv pip install` step below installs + # into it). Also enables uv's built-in cache. The cache key takes + # the platform, the uv version, and a hash of the files below + # into account. # See https://docs.astral.sh/uv/guides/integration/github/ for details. # NOTE: setup-uv publishes immutable releases only (no # floating major tags), so we pin the full version - - name: Install uv + - name: Install uv and python uses: astral-sh/setup-uv@v9.0.0 with: + python-version: "${{ inputs.python-version }}" + activate-environment: true enable-cache: true cache-suffix: "py${{ inputs.python-version }}" cache-dependency-glob: | @@ -34,4 +36,4 @@ runs: - name: Install requirements if: ${{ inputs.requirements != '' }} shell: bash - run: uv pip install --verbose --system ${{ inputs.requirements }} + run: uv pip install --verbose ${{ inputs.requirements }} From c2c4ca7c4c68901b93fc52122afdafde3ad08961 Mon Sep 17 00:00:00 2001 From: Tomas Pereira de Vasconcelos Date: Sat, 25 Jul 2026 13:46:36 +0200 Subject: [PATCH 2/2] Add changelog entry for PR 393 --- docs/reference/changelog.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/reference/changelog.md b/docs/reference/changelog.md index 6d462fdc..a55ce186 100644 --- a/docs/reference/changelog.md +++ b/docs/reference/changelog.md @@ -31,6 +31,7 @@ Unreleased changes - pre-commit autoupdate ({gh-pr}`379`) - Fix the test suite's compatibility with the latest pytest release ({gh-pr}`384`) - Use the official `astral-sh/setup-uv` action to install and cache `uv` in CI ({gh-pr}`386`) +- Let `uv` manage the Python interpreter and virtual environment in CI ({gh-pr}`393`) ---