ci: use uv to install poetry in CI workflow#1673
Merged
Merged
Conversation
Mirror of esphome/aioesphomeapi#1650 for python-zeroconf. Replace the `pipx install poetry` step in the test matrix and the `snok/install-poetry` action in the benchmarks job with `astral-sh/setup-uv@v8.1.0` followed by `uv tool install poetry`. `setup-python`'s `cache: "poetry"` continues to cache the per-job virtualenv keyed off `poetry.lock`; the change is strictly in how poetry itself gets onto PATH. `uv tool install poetry` provisions poetry far faster than `pipx install poetry`, and `setup-uv`'s `enable-cache: true` covers subsequent wheel fetches. Effect is per-job, so it compounds across the test matrix (CPython 3.9-3.14, 3.14t, PyPy 3.9/3.10 over Linux/macOS/Windows). No production code is touched.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1673 +/- ##
=======================================
Coverage 99.76% 99.76%
=======================================
Files 33 33
Lines 3401 3401
Branches 461 461
=======================================
Hits 3393 3393
Misses 5 5
Partials 3 3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Mirror of esphome/aioesphomeapi#1650 for
python-zeroconf. Speeds up CI by replacing the slowpipx install poetry/snok/install-poetryprovisioning withastral-sh/setup-uv+uv tool install poetry. No production code is touched.Details
testjob — addsastral-sh/setup-uv@v8.1.0(SHA-pinned,enable-cache: true) before installing poetry, then runsuv tool install poetryin place ofpipx install poetry.setup-python'scache: "poetry"is preserved — it caches the per-job project venv keyed offpoetry.lock, which is independent of how poetry itself reachesPATH.benchmarkjob — same swap: thesnok/install-poetry@v1.4.1action is replaced withsetup-uv+uv tool install poetry.Win is per-job, so it compounds across the test matrix (CPython 3.9–3.14, 3.14t, PyPy 3.9/3.10 × Linux/macOS/Windows ×
skip_cython/use_cython). Steady-state behaviour is unchanged; the speed-up shows up on every job's poetry-install step and on cache misses for wheel downloads via uv's cache.Test plan
testmatrix is green across all rows (the workflow change is exercised by every job on this PR).benchmarkjob runs to completion and CodSpeed posts a delta.lintandcommitlintjobs are green.