chore(hooks): add fast local pre-push hook for lint, commit style, and workflow YAML

Merged
GR
10d ago
+244-0

Summary

Part 4 of the CI optimization series: adds a fast (<1s) local pre-push hook so lint, commit style, and workflow YAML errors are caught locally before burning CI runner time.

Changes

  • .githooks/pre-push:
    • Validates commit subjects against .github/ci/check_commit_messages.py.
    • Runs ruff check and ruff format --check on changed .py files only.
    • Validates YAML syntax on changed .github/workflows/*.yml files.
  • Makefile: adds make install-hooks (git config core.hooksPath .githooks).

Verification

  • bash -n .githooks/pre-push passes.
  • Measured runtime: ~0.05s (<9s budget).