Skip to content

ci: use uv to install poetry in CI workflow#1673

Merged
bdraco merged 1 commit into
masterfrom
ci-use-uv-for-poetry
May 15, 2026
Merged

ci: use uv to install poetry in CI workflow#1673
bdraco merged 1 commit into
masterfrom
ci-use-uv-for-poetry

Conversation

@bdraco

@bdraco bdraco commented May 15, 2026

Copy link
Copy Markdown
Member

Summary

Mirror of esphome/aioesphomeapi#1650 for python-zeroconf. Speeds up CI by replacing the slow pipx install poetry / snok/install-poetry provisioning with astral-sh/setup-uv + uv tool install poetry. No production code is touched.

Details

  • test job — adds astral-sh/setup-uv@v8.1.0 (SHA-pinned, enable-cache: true) before installing poetry, then runs uv tool install poetry in place of pipx install poetry. setup-python's cache: "poetry" is preserved — it caches the per-job project venv keyed off poetry.lock, which is independent of how poetry itself reaches PATH.
  • benchmark job — same swap: the snok/install-poetry@v1.4.1 action is replaced with setup-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

  • CI test matrix is green across all rows (the workflow change is exercised by every job on this PR).
  • CI benchmark job runs to completion and CodSpeed posts a delta.
  • lint and commitlint jobs are green.

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.
@codspeed-hq

codspeed-hq Bot commented May 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 6 untouched benchmarks


Comparing ci-use-uv-for-poetry (7091b92) with master (93e5e4f)1

Open in CodSpeed

Footnotes

  1. No successful run was found on master (72a0152) during the generation of this report, so 93e5e4f was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@codecov

codecov Bot commented May 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.76%. Comparing base (72a0152) to head (7091b92).
⚠️ Report is 4 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@bdraco bdraco merged commit ba58754 into master May 15, 2026
39 checks passed
@bdraco bdraco deleted the ci-use-uv-for-poetry branch May 15, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant