Skip to content

Commit 328ca60

Browse files
Merge branch 'main' into 219-dependency-groups
2 parents ac819a3 + 79984b1 commit 328ca60

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

.github/actions/setup-python/action.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,20 @@ inputs:
1313
runs:
1414
using: composite
1515
steps:
16-
- uses: actions/setup-python@v5
17-
with:
18-
python-version: "${{ inputs.python-version }}"
19-
20-
# Install uv and enable its built-in cache. The cache key takes the
21-
# platform, the uv version, and a hash of the files below into account.
16+
# Install uv together with a uv-managed Python interpreter, and
17+
# create and activate a virtual environment that is used by all
18+
# subsequent steps (e.g. the `uv pip install` step below installs
19+
# into it). Also enables uv's built-in cache. The cache key takes
20+
# the platform, the uv version, and a hash of the files below
21+
# into account.
2222
# See https://docs.astral.sh/uv/guides/integration/github/ for details.
2323
# NOTE: setup-uv publishes immutable releases only (no
2424
# floating major tags), so we pin the full version
25-
- name: Install uv
25+
- name: Install uv and python
2626
uses: astral-sh/setup-uv@v9.0.0
2727
with:
28+
python-version: "${{ inputs.python-version }}"
29+
activate-environment: true
2830
enable-cache: true
2931
cache-suffix: "py${{ inputs.python-version }}"
3032
cache-dependency-glob: |
@@ -34,4 +36,4 @@ runs:
3436
- name: Install requirements
3537
if: ${{ inputs.requirements != '' }}
3638
shell: bash
37-
run: uv pip install --verbose --system ${{ inputs.requirements }}
39+
run: uv pip install --verbose ${{ inputs.requirements }}

docs/reference/changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ Unreleased changes
3535
- pre-commit autoupdate ({gh-pr}`379`)
3636
- Fix the test suite's compatibility with the latest pytest release ({gh-pr}`384`)
3737
- Use the official `astral-sh/setup-uv` action to install and cache `uv` in CI ({gh-pr}`386`)
38+
- Let `uv` manage the Python interpreter and virtual environment in CI ({gh-pr}`393`)
3839

3940
---
4041

tox.ini

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,11 +108,10 @@ commands = python cicd_utils/cicd/scripts/extract_latest_release_notes.py
108108

109109
[testenv:build-dists]
110110
description = build source (sdist) and binary (wheel) distributions
111-
deps =
112-
build
113-
twine
114-
allowlist_externals = rm
111+
skip_install = true
112+
deps = twine
113+
allowlist_externals = rm, uv
115114
commands =
116115
rm -rf dist/
117-
python -m build
116+
uv build
118117
twine check --strict dist/*

0 commit comments

Comments
 (0)