Forgejo Actions is not enabled on the instance, so run the same checks locally before pushing: - scripts/check.sh runs ruff, mypy, and pytest (mirrors the CI workflow). - .githooks/pre-push invokes it; enable per clone with `git config core.hooksPath .githooks`. Bypass with `git push --no-verify`. - Fix the pytest invocation in the CI workflow (and document it): use `python -m pytest` so the repo root is on sys.path, otherwise the test modules fail to `import tests.*`. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
11 lines
331 B
Bash
Executable file
11 lines
331 B
Bash
Executable file
#!/usr/bin/env bash
|
|
#
|
|
# Pre-push gate: run the local CI checks (ruff + mypy + pytest) before allowing
|
|
# a push. Blocks the push on any failure.
|
|
#
|
|
# Enable in a fresh clone with:
|
|
# git config core.hooksPath .githooks
|
|
# Bypass a single push with:
|
|
# git push --no-verify
|
|
#
|
|
exec "$(git rev-parse --show-toplevel)/scripts/check.sh"
|