Repository navigation
feat: run the CI checks in a pre-push hook - #84
Merged
Merged
Conversation
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.
What changed
Adds
lefthook.ymlwith apre-pushjob that runsmake lint typecheck test-fast, and a line indocs/README.mdandAGENTS.mdon enabling it withlefthook install. The job clears git's repo variables first, so it runs from a linked worktree.Why
CI runs ruff, mypy and
pytest -m "not slow"on every pull request. A push should not need CI to find a failure the local checks would. The package build job is not in the hook.Closes #83
How you checked it
make lint typecheck test-fastfrom a fresh worktree of origin/main: exit 0, 7 s (296 passed)lefthook run pre-push --force(lefthook 2.2.2): exit 0, 4 s. Run again withGIT_DIRandGIT_INDEX_FILEexported: exit 0, 4 sThe worktree needs its own
.venv, asmakeuses it.