Skip to content

ci: install astral managed Python so prerelease setup is cached#444

Merged
bdraco merged 3 commits into
mainfrom
ci/astral-managed-python
May 22, 2026
Merged

ci: install astral managed Python so prerelease setup is cached#444
bdraco merged 3 commits into
mainfrom
ci/astral-managed-python

Conversation

@bdraco
Copy link
Copy Markdown
Member

@bdraco bdraco commented May 22, 2026

The big chunk of time in the test matrix is actions/setup-python downloading and installing Python from manifest. On Windows + 3.14t (free threaded) that step alone takes around 50 seconds because the prerelease is not pre-baked into the hosted-tools cache.

Move the test and benchmark jobs to astral managed Python through a small composite action mirroring the home-assistant/core#171760 approach: pin uv (no manifest fetch on cache miss), request the interpreter via setup-uv with cache-python: true, then eagerly uv python install so cached venvs that point at the managed python resolve their symlinks on restore. Poetry is pointed at the managed interpreter with poetry env use $(uv python find $version) on cache miss.

Venv cache key bumped from v2 to v3 to discard older entries that pointed at the actions/setup-python interpreter.

Lint and build_wheels left alone; lint is already fast and cibuildwheel manages its own pythons.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented May 22, 2026

Merging this PR will not alter performance

✅ 16 untouched benchmarks


Comparing ci/astral-managed-python (dfbb4d3) with main (bb76920)

Open in CodSpeed

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.05%. Comparing base (78504ba) to head (dfbb4d3).
⚠️ Report is 2 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #444      +/-   ##
==========================================
+ Coverage   95.94%   96.05%   +0.11%     
==========================================
  Files          14       14              
  Lines        1922     1976      +54     
  Branches      232      247      +15     
==========================================
+ Hits         1844     1898      +54     
  Misses         42       42              
  Partials       36       36              

☔ 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 marked this pull request as ready for review May 22, 2026 01:14
@bdraco bdraco merged commit be34547 into main May 22, 2026
39 of 40 checks passed
@bdraco bdraco deleted the ci/astral-managed-python branch May 22, 2026 01:15
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