pi-ext
bugabingas pi extensions
owned by bugabinga
build: add mise git hooks (pre-commit: fmt+lint+test, pre-push: ci)
63b82c42d06e6023e92670bdcbf8bbeb873f44c4
Oliver Jan Krylow <oliver@bugabinga.net> ·
unsigned
Browse filesCompare with HEAD
Changed files (2)
35 35 escalate to a human.
36 36 Do not work around `mise` or add ad-hoc scripts.
40 +- `pre-commit` — runs `fmt` + `lint` + `test`
41 +- `pre-push` — runs full `ci`
43 +Managed via `mise generate git-pre-commit`.
44 +To reinstall after clone:
45 +`mise generate git-pre-commit --write && mise generate git-pre-commit --hook
46 +pre-push --task pre-push --write`.
40 50 If `mise run` tasks fail with command-not-found errors, run `mise doctor`.
62 62 run =
"PI_EXT_CI_DONE=1 python3 scripts/extensions.py publish \"$@\"" 65 +description =
"Pre-commit hook: fmt + lint + test" 66 +run = [
"mise run fmt",
"mise run lint",
"mise run test"]
69 +description =
"Pre-push hook: full CI" 64 72 [
tasks.
goal-pexpect]
65 73 description =
"Run goal pexpect test" 66 74 run =
"python3 -c 'import subprocess, sys; args = sys.argv[1:]; subprocess.run([\"python3\", \"scripts/test_goal_pexpect.py\", *(([\"--idea\", args[0], *args[1:]]) if args and not args[0].startswith(\"-\") else args)], check=True)'"