-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathlefthook.yml
More file actions
29 lines (28 loc) · 1018 Bytes
/
lefthook.yml
File metadata and controls
29 lines (28 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
pre-commit:
commands:
lint:
run: uv run ruff check {staged_files}
glob: "*.py"
wal-guard:
run: uv run pytest tests/test_wal_growth_guard.py -q --tb=short
glob: "*.py"
pre-push:
commands:
typecheck:
glob: "**/*.py"
run: uv run mypy src
test:
glob: "**/*.py"
env:
PYTHONIOENCODING: "utf-8:replace"
# Script file avoids Windows quote-mangling of "not slow" that breaks
# both cmd.exe and shell: bash inline forms. The script sets -n 0 to
# override the -n auto addopts and avoids xdist INTERNALERROR crashes.
run: bash .lefthook/pre-push/test.sh
wsl-test:
glob: "**/*.py"
# Mirrors CI ubuntu-latest gate (-n auto, not slow). Runs in parallel
# with the Windows test step — hook wall time stays at ~7 min.
# Catches Linux-specific failures (platform gating, os.sep, etc.)
# before they reach CI. Skips gracefully when WSL is unavailable.
run: bash .lefthook/pre-push/wsl-test.sh