Repository navigation
Run pre-commit hooks in CI - #13
Merged
Merged
Conversation
Add a dedicated Ubuntu CI job that runs all pre-commit hooks with Python 3.11 and a pinned pre-commit version. Cache hook environments to speed up subsequent workflow runs and show proposed fixes when a hook fails.
Name each license-header hook for its target file type. Make hook output distinguish copyright text, Python, C/C++, Markdown, configuration, and Vim.
Upgrade checkout, cache, and setup-uv to releases using Node.js 24. Pin Linux jobs to Ubuntu 24.04 to keep the tested runner image stable through the ubuntu-latest migration.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add a dedicated
pre-commitCI job so every pull request and existing CI push trigger runs the repository’s hook suite. Use uv with Python 3.11 and pre-commit 4.6.1, cache hook environments, and show diffs when hooks propose fixes.Give the six license-header hooks distinct display names for copyright text, Python, C/C++, Markdown, configuration, and Vim. Upgrade checkout, cache, and setup-uv to Node.js 24 releases, and pin Linux jobs to Ubuntu 24.04 to avoid the moving ubuntu-latest image and its migration notice.
Validation: the exact CI hook command passed across all files locally. All 11 Python integration and parser tests, Python quality checks, commit-time hooks, and whitespace checks passed. The previous CI run passed before the action and runner updates; those updates still need confirmation in CI.
The check to require is
pre-commit; branch protection is configured separately. Commit-message validation remains a local commit hook.