Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions .github/actions/setup-python/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand All @@ -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 }}
1 change: 1 addition & 0 deletions docs/reference/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`)

---

Expand Down
Loading