Skip to content

Install uv with astral-sh/setup-uv action in CI - #129

Merged
puddly merged 4 commits into
puddly:devfrom
TheJulianJES:tjj/ci-setup-uv
Oct 12, 2026
Merged

puddly merged 4 commits into
puddly:devfrom
TheJulianJES:tjj/ci-setup-uv

Conversation

@TheJulianJES

@TheJulianJES TheJulianJES commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Proposed changes

Detailed AI-generated PR description

A recent CI run on dev failed in prepare-base because the uv install script download hit a connection reset, which left uv missing for the rest of the job: https://github.com/puddly/serialx/actions/runs/37135339486/job/111238619586

This replaces curl -LsSf https://astral.sh/uv/install.sh | sh with astral-sh/setup-uv (already used by the docs workflow), which retries its version manifest fetch, downloads uv from the Astral mirror with a fallback to GitHub Releases, and verifies checksums:

  • prepare-base and compile-esphome install uv with setup-uv, only on a cache miss like the step that uses it. Its own cache is disabled since the venv/binary is already cached.
  • pytest and pytest-esphome drop their uv install step entirely. uv is part of the dev extra, so it's already in the cached venv, and every uv call in those jobs runs after the venv is activated (the curl-installed copy was shadowed by venv/bin/uv anyway).

The docs workflow is also bumped from setup-uv v8.1.0 to v10.2.0 to keep both on the same pin. It sets enable-cache: true explicitly, so the v9/v10 cache default changes don't affect it.

The pytest jobs already get `uv` from the cached venv (it is part of the
`dev` extra), so their separate install step is dropped entirely.
@codecov

codecov Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.33%. Comparing base (b853b11) to head (2a4e819).
⚠️ Report is 1 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #129      +/-   ##
==========================================
+ Coverage   94.32%   94.33%   +0.01%     
==========================================
  Files          25       25              
  Lines        4337     4345       +8     
==========================================
+ Hits         4091     4099       +8     
  Misses        246      246              

☔ View full report in Codecov by Harness.
📢 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.

@TheJulianJES

TheJulianJES commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

For testing, this PR should hopefully show that everything is working as expected

The other PR already cached the venv. This run here shows that setup-uv is working as expected. The prek/ruff failure is unrelated and only happened because the newly generated venv happened to pick up a newer ruff version. This should be fixed separately. This PR would be ready.

For Prek/ruff fixes, see both:

@TheJulianJES
TheJulianJES marked this pull request as ready for review October 12, 2026 09:30
@puddly
puddly merged commit 67352d4 into puddly:dev Oct 12, 2026
31 checks passed
@TheJulianJES
TheJulianJES deleted the tjj/ci-setup-uv branch October 12, 2026 22:55
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.

2 participants