From 759c759aadd8c1d9c0b04e09b1129d5b41e729f3 Mon Sep 17 00:00:00 2001 From: Rue <343175018+thatsrue@users.noreply.github.com> Date: Fri, 30 Oct 2026 22:00:55 -0400 Subject: [PATCH] feat: run the CI checks in a pre-push hook --- AGENTS.md | 1 + docs/README.md | 1 + lefthook.yml | 6 ++++++ 3 files changed, 8 insertions(+) create mode 100644 lefthook.yml diff --git a/AGENTS.md b/AGENTS.md index 83f4d4a..39c52dd 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -410,6 +410,7 @@ fails loudly. extend one that already covers it. Use synthetic fixtures where possible, and the slow whisper tests only when testing whisper behavior. 6. Run `make lint`, `make typecheck` and `make test` before declaring done. + `lefthook install` runs `make lint typecheck test-fast` before every push (`lefthook.yml`). ## Common Pitfalls diff --git a/docs/README.md b/docs/README.md index 86852c5..2249a12 100644 --- a/docs/README.md +++ b/docs/README.md @@ -136,6 +136,7 @@ make check-sample # Transcribe the 4-speaker AMI sample; p make lint # ruff check and format check make format # ruff format make typecheck # mypy --strict +lefthook install # Run lint, typecheck and test-fast before every push make clean-output # Delete every session's outputs under tmp/output ``` diff --git a/lefthook.yml b/lefthook.yml new file mode 100644 index 0000000..21a91c0 --- /dev/null +++ b/lefthook.yml @@ -0,0 +1,6 @@ +# Runs what CI runs, minus the package build. Install once per clone: `lefthook install`. +pre-push: + jobs: + - name: check + # Git's repo variables break tools run from a linked worktree. + run: unset $(git rev-parse --local-env-vars); make lint typecheck test-fast