Run the local gate from a versioned pre-push hook

The Gitea server has no Actions, so scripts/check.sh is the gate. A
versioned .githooks/pre-push runs it; CONTRIBUTING explains how to
enable it per clone and when it may be skipped.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
v0.8.2
dev 2 weeks ago
parent 2d60d6b26e
commit 5719f6a4b3

@ -0,0 +1,7 @@
#!/usr/bin/env bash
# Versioned pre-push hook. The server runs no CI, so the local gate runs here.
# Enable once per clone: git config core.hooksPath .githooks
# Skip only deliberately: git push --no-verify
set -euo pipefail
cd "$(git rev-parse --show-toplevel)"
exec scripts/check.sh

@ -37,6 +37,17 @@ dependencies are not accepted without prior discussion.
## Tests
The server runs no CI. The gate is `scripts/check.sh`, run by the versioned
`pre-push` hook once you enable it in your clone:
```bash
git config core.hooksPath .githooks
```
Skip it only deliberately with `git push --no-verify`, and say why in the
commit message. The workflows in `.gitea/workflows` are ready for a Gitea 1.21
or later with a runner; until then they do not run.
```bash
./scripts/check.sh # everything ci.yml runs, on any machine; run before pushing
go test -race ./...

Loading…
Cancel
Save

Powered by TurnKey Linux.