Compare commits

...

2 Commits

Author SHA1 Message Date
Michael Suchacz
29258ca775 remove pre-push hook entirely; pre-commit is sufficient 2026-03-11 16:24:04 +00:00
Michael Suchacz
567d19fa62 chore(hooks): run lite checks instead of full test suite on pre-push
The pre-push git hook now runs `make pre-commit` (gen, fmt, lint,
typos, build) instead of `make pre-push` (full test suite including
tests, race detection, e2e, sqlc-vet, offlinedocs).

The full test suite still runs in CI. Developers can still run it
locally with `make pre-push` when desired.
2026-03-11 16:22:17 +00:00
2 changed files with 2 additions and 31 deletions

View File

@@ -119,15 +119,12 @@ no matter how long they take.
git config core.hooksPath scripts/githooks
```
Two hooks run automatically:
A pre-commit hook runs automatically:
- **pre-commit**: `make pre-commit` (gen, fmt, lint, typos, build).
Fast checks that catch most CI failures. Allow at least 5 minutes.
- **pre-push**: `make pre-push` (full CI suite including tests).
Runs before pushing to catch everything CI would. Allow at least
15 minutes (race tests are slow without cache).
`git commit` and `git push` will appear to hang while hooks run.
`git commit` will appear to hang while the hook runs.
This is normal. Do not interrupt, retry, or reduce the timeout.
NEVER run `git config core.hooksPath` to change or disable hooks.

View File

@@ -1,26 +0,0 @@
#!/usr/bin/env bash
#
# Pre-push hook that runs the full CI suite locally.
# Runs `make pre-push` (gen, fmt, lint, typos, build, tests)
# to catch issues before they reach CI.
#
# The pre-commit hook already runs the lite checks on each commit.
# This hook adds the heavier checks (test-postgres, test-js,
# test-e2e, sqlc-vet, offlinedocs) before pushing.
#
# Installation (worktree-compatible):
#
# git config core.hooksPath scripts/githooks
#
# Bypass: git push --no-verify
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
unset GIT_DIR
# In linked worktrees, set worktree-scoped hooksPath to override shared config.
if [[ "$(git rev-parse --git-dir)" != "$(git rev-parse --git-common-dir)" ]]; then
git config --worktree core.hooksPath scripts/githooks
fi
exec make pre-push