2026-07-21 03:15:54 -04:00
|
|
|
# Glob patterns below mirror the `changes` job's dorny/paths-filter groups in
|
|
|
|
|
# .github/workflows/ci.yml — keep the two in sync. Deliberate deviations:
|
|
|
|
|
# - The `.github/workflows/ci.yml` path CI adds to its `rust`/`mobile` filters
|
|
|
|
|
# is omitted; a CI-workflow-only edit doesn't need a local test run.
|
2026-08-06 16:57:12 -04:00
|
|
|
# - `desktop-check`/`desktop-typecheck`/`desktop-test` don't trigger on `rust`
|
|
|
|
|
# changes, though CI's Desktop Core job does. Those commands are pure TS
|
|
|
|
|
# (biome + tsc + node:test) with no Rust dependency, so the extra trigger
|
|
|
|
|
# would be spurious locally.
|
2026-07-21 03:15:54 -04:00
|
|
|
# - Deletion-only surface changes do not trigger local hooks: lefthook 2.1.x
|
|
|
|
|
# drops deleted paths from push-file discovery (`extractFiles` existence
|
|
|
|
|
# check, repository.go). CI's dorny/paths-filter catches deletions.
|
|
|
|
|
# Deliberate — accepted, not worked around.
|
2026-07-26 10:43:06 -07:00
|
|
|
# - `commit-msg` has no glob: it rewrites the commit message, not files. Note
|
|
|
|
|
# Git only runs it for `git commit` and `git merge` — other flows need their own
|
|
|
|
|
# flag: `git rebase --signoff`, `git cherry-pick -s`.
|
2026-03-09 13:02:11 -07:00
|
|
|
pre-commit:
|
2026-05-26 18:05:42 -04:00
|
|
|
parallel: true
|
2026-03-09 13:02:11 -07:00
|
|
|
commands:
|
|
|
|
|
rust-fmt:
|
2026-07-21 03:15:54 -04:00
|
|
|
glob: ["crates/**", "examples/countdown-bot/**"]
|
2026-05-28 17:42:35 -04:00
|
|
|
run: just fmt
|
|
|
|
|
stage_fixed: true
|
2026-03-26 12:50:44 -07:00
|
|
|
desktop-tauri-fmt:
|
2026-07-21 03:15:54 -04:00
|
|
|
glob: ["desktop/src-tauri/**"]
|
2026-05-28 17:42:35 -04:00
|
|
|
run: just desktop-tauri-fmt
|
|
|
|
|
stage_fixed: true
|
|
|
|
|
desktop-fix:
|
2026-07-21 03:15:54 -04:00
|
|
|
glob: ["desktop/**", "pnpm-lock.yaml"]
|
|
|
|
|
exclude: ["desktop/src-tauri/**"]
|
2026-05-28 17:42:35 -04:00
|
|
|
run: just desktop-fix
|
|
|
|
|
stage_fixed: true
|
|
|
|
|
web-fix:
|
2026-07-21 03:15:54 -04:00
|
|
|
glob: ["web/**", "pnpm-lock.yaml"]
|
2026-05-28 17:42:35 -04:00
|
|
|
run: just web-fix
|
|
|
|
|
stage_fixed: true
|
|
|
|
|
mobile-fix:
|
2026-07-21 03:15:54 -04:00
|
|
|
glob: ["mobile/**"]
|
2026-05-28 17:42:35 -04:00
|
|
|
run: just mobile-fix
|
|
|
|
|
stage_fixed: true
|
2026-03-09 13:02:11 -07:00
|
|
|
|
2026-07-26 10:43:06 -07:00
|
|
|
# Appends the DCO Signed-off-by trailer the required "DCO Check" enforces.
|
|
|
|
|
# `--if-exists doNothing` makes it idempotent and preserves an existing
|
|
|
|
|
# sign-off (including `git commit -s` and a different signer's trailer).
|
|
|
|
|
commit-msg:
|
|
|
|
|
commands:
|
|
|
|
|
signoff:
|
|
|
|
|
run: 'git interpret-trailers --if-exists doNothing --trailer "Signed-off-by: $(git var GIT_COMMITTER_IDENT | sed ''s/ [0-9]* [+-][0-9]*$//'')" --in-place {1}'
|
|
|
|
|
|
2026-03-09 13:02:11 -07:00
|
|
|
pre-push:
|
|
|
|
|
parallel: true
|
|
|
|
|
commands:
|
2026-07-15 22:43:32 -06:00
|
|
|
branch-skew:
|
|
|
|
|
run: ./scripts/check-branch-skew.sh
|
2026-03-09 13:02:11 -07:00
|
|
|
rust-tests:
|
2026-07-21 03:15:54 -04:00
|
|
|
glob: ["crates/**", "migrations/**", "schema/**", "Cargo.toml", "Cargo.lock", "rust-toolchain.toml", "deny.toml", "scripts/run-tests.sh", "justfile"]
|
2026-03-09 13:02:11 -07:00
|
|
|
run: just test-unit
|
2026-07-15 09:26:01 -06:00
|
|
|
desktop-check:
|
2026-07-21 03:15:54 -04:00
|
|
|
glob: ["desktop/**", "pnpm-lock.yaml"]
|
|
|
|
|
exclude: ["desktop/src-tauri/**"]
|
2026-07-15 09:26:01 -06:00
|
|
|
run: just desktop-check
|
2026-08-06 16:57:12 -04:00
|
|
|
desktop-typecheck:
|
|
|
|
|
glob: ["desktop/**", "pnpm-lock.yaml"]
|
|
|
|
|
exclude: ["desktop/src-tauri/**"]
|
|
|
|
|
run: just desktop-typecheck
|
2026-05-28 08:17:02 -07:00
|
|
|
desktop-test:
|
2026-07-21 03:15:54 -04:00
|
|
|
glob: ["desktop/**", "pnpm-lock.yaml"]
|
|
|
|
|
exclude: ["desktop/src-tauri/**"]
|
2026-05-28 08:17:02 -07:00
|
|
|
run: just desktop-test
|
2026-07-29 09:52:50 -06:00
|
|
|
desktop-tauri-checks:
|
2026-07-29 09:20:49 -06:00
|
|
|
# Keep local lint parity with Desktop Core CI for every path that can
|
2026-07-29 09:52:50 -06:00
|
|
|
# affect the Tauri crate or its path dependencies. Run clippy and tests
|
|
|
|
|
# serially so parallel pre-push hooks do not contend for Cargo's lock.
|
2026-07-29 09:20:49 -06:00
|
|
|
glob: ["desktop/src-tauri/**", "crates/**", "migrations/**", "schema/**", "Cargo.toml", "Cargo.lock", "rust-toolchain.toml", "deny.toml", "scripts/run-tests.sh", "justfile"]
|
2026-07-29 09:52:50 -06:00
|
|
|
run: just desktop-tauri-clippy && just desktop-tauri-test
|
2026-04-13 09:55:14 -07:00
|
|
|
mobile-test:
|
2026-07-21 03:15:54 -04:00
|
|
|
glob: ["mobile/**"]
|
2026-04-13 09:55:14 -07:00
|
|
|
run: just mobile-test
|