Skip to content

[ci] Use uv for pip installs in CI workflow - #1650

Merged
J. Nick Koston (bdraco) merged 1 commit into
mainfrom
ci/use-uv-for-pip-installs
May 15, 2026
Merged

J. Nick Koston (bdraco) merged 1 commit into
mainfrom
ci/use-uv-for-pip-installs

Conversation

@bdraco

Copy link
Copy Markdown
Member

What does this implement/fix?

Mirror of esphome/esphome#16451 for the aioesphomeapi side.

.github/workflows/ci.yml was the only place still calling raw
pip3 install. Both matrix entries in the ci job (skip_cython
/ use_cython) and the standalone benchmarks job now go through
uv pip install --system, with astral-sh/[email protected]
(SHA-pinned, enable-cache: true) added beforehand.

Changes:

  • ci job — drops the manual pip cache dir + actions/cache
    pair (redundant once uv has its own cache) and rewrites the
    two Set up Python environment (...) steps to use uv pip install --system. There is no venv in this workflow, so
    --system lands the install in the setup-python interpreter,
    matching the previous pip3 install shape.
  • benchmarks job — drops cache: 'pip' from setup-python
    for the same reason and switches its pip3 install calls to
    uv pip install --system.

No production code is touched; this is workflow-only. Steady-state
behaviour is identical to today — the speed-up shows up on cache
misses (requirements change, new Python version, etc.) and on the
first run after the cache key rotates.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Code quality improvements to existing code or addition of tests
  • Other

Related issue or feature (if applicable):

Pull request in esphome (if applicable):

Checklist:

  • The code change is tested and works locally.
  • If api.proto was modified, a linked pull request has been made to esphome with the same changes.
  • Tests have been added to verify that the new code works (under tests/ folder).

Mirror esphome/esphome#16451 for the aioesphomeapi side. Both
matrix entries in the `ci` job and the `benchmarks` job switched
from `pip3 install` to `uv pip install --system` and now pull in
`astral-sh/[email protected]` (SHA-pinned, `enable-cache: true`).
The manual pip download cache and `setup-python`'s `cache: pip`
are dropped — uv's own cache replaces both.
Copilot AI review requested due to automatic review settings May 15, 2026 18:20
@coderabbitai

coderabbitai Bot commented May 15, 2026

Copy link
Copy Markdown
Contributor

Warning

Rate limit exceeded

@bdraco has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 21 minutes and 49 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 85542f01-2a65-4a1e-9320-ed2f38cf93d3

📥 Commits

Reviewing files that changed from the base of the PR and between 91abdc4 and 228b0b7.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/use-uv-for-pip-installs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@bdraco
J. Nick Koston (bdraco) merged commit 283f9fd into main May 15, 2026
17 checks passed
@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 100.00%. Comparing base (91abdc4) to head (228b0b7).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #1650   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           25        25           
  Lines         4043      4043           
=========================================
  Hits          4043      4043           

☔ 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.

@bdraco
J. Nick Koston (bdraco) deleted the ci/use-uv-for-pip-installs branch May 15, 2026 18:21
@codspeed

codspeed Bot commented May 15, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 40 untouched benchmarks


Comparing ci/use-uv-for-pip-installs (228b0b7) with main (91abdc4)

Open in CodSpeed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This workflow-only PR updates CI dependency installation to use uv instead of direct pip3 install, aligning aioesphomeapi CI with the mirrored ESPHome workflow change.

Changes:

  • Adds astral-sh/setup-uv with caching to CI and benchmark jobs.
  • Replaces pip3 install commands with uv pip install --system.
  • Removes redundant pip cache setup from affected jobs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants