Fix pre-commit CI issues by switching to lite mode - #9484
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## dev #9484 +/- ##
=======================================
Coverage 59.69% 59.69%
=======================================
Files 50 50
Lines 10261 10261
Branches 1379 1379
=======================================
Hits 6125 6125
Misses 3777 3777
Partials 359 359 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bdraco
marked this pull request as ready for review
July 14, 2025 03:13
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR switches the CI to use pre-commit.ci lite mode, resolving version mismatches by consolidating linters into a single GitHub Actions job and updating cache behavior.
- Disable automatic updates and skip problematic hooks in
.pre-commit-config.yaml - Update cache key to include
.pre-commit-config.yamland installpre-commitin the common setup - Remove separate ruff/flake8/clang-format jobs and add a unified
pre-commit-ci-litejob
Comments suppressed due to low confidence (2)
.github/workflows/ci.yml:504
- The job-level
ifcondition needs to be wrapped in${{ }}to be evaluated correctly. For example:
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'beta' && github.base_ref != 'release' }}
if: github.event_name == 'pull_request' && github.base_ref != 'beta' && github.base_ref != 'release'
.github/workflows/ci.yml:504
- To properly skip all release branches (e.g.
release/v1.2), consider usingstartsWithinstead of exact match. For example:
if: ${{ github.event_name == 'pull_request' && github.base_ref != 'beta' && !startsWith(github.base_ref, 'release/') }}
if: github.event_name == 'pull_request' && github.base_ref != 'beta' && github.base_ref != 'release'
jesserockz
approved these changes
Jul 14, 2025
bdraco
added a commit
that referenced
this pull request
Jul 14, 2025
6 tasks
jesserockz
pushed a commit
that referenced
this pull request
Jul 15, 2025
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
What does this implement/fix?
This PR switches to pre-commit.ci lite mode to resolve version mismatch issues between our dependencies and pre-commit configuration on the beta branch. The lite mode provides auto-fixing of PRs through GitHub Actions rather than the full pre-commit.ci service.
Changes:
.pre-commit-config.yamlto ensure proper cache invalidation when pre-commit hooks changeTypes of changes
Related issue or feature (if applicable):
Pull request in esphome-docs with documentation (if applicable):
Test Environment
Example entry for
config.yaml:# N/A - CI configuration changeChecklist:
tests/folder).If user exposed functionality or configuration variables are added/changed: