mirror of
https://github.com/block/buzz.git
synced 2026-10-27 12:40:30 +00:00
Serialize the mobile pre-push analysis and test commands into one lane, mirroring the existing `desktop-tauri-checks` pattern. The shared Flutter state under `mobile/` (`.dart_tool`, shader bundle, and `pubspec.lock`) must not be driven by parallel hook processes. The existing `mobile/**` path filter is unchanged; `mobile-check` now runs before `mobile-test` in the same lane. - Replace the parallel `mobile-check` and `mobile-test` commands with `mobile-checks`. - Keep the commands serial with `just mobile-check && just mobile-test`. Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Co-authored-by: Alia <d32955ad69077062930cc46cfe2df30ca9aaf6f8e76422681265e9e9af704d78@buzz.block.builderlab.xyz>
89 lines
4.0 KiB
YAML
89 lines
4.0 KiB
YAML
# 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.
|
|
# - `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.
|
|
# - The repository-wide `file-size-check` is deliberately unfiltered. Its own
|
|
# merge-base diff is the path filter; duplicating its governed roots here is
|
|
# the coverage drift this gate is intended to prevent.
|
|
# - 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.
|
|
# - `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`.
|
|
pre-commit:
|
|
parallel: true
|
|
commands:
|
|
rust-fmt:
|
|
glob: ["crates/**", "examples/countdown-bot/**"]
|
|
run: just fmt
|
|
stage_fixed: true
|
|
desktop-tauri-fmt:
|
|
glob: ["desktop/src-tauri/**"]
|
|
run: just desktop-tauri-fmt
|
|
stage_fixed: true
|
|
desktop-fix:
|
|
# A lockfile-only change has no desktop source for Biome to rewrite.
|
|
glob: ["desktop/**"]
|
|
exclude: ["desktop/src-tauri/**"]
|
|
run: just desktop-fix
|
|
stage_fixed: true
|
|
web-fix:
|
|
# A lockfile-only change has no web source for Biome to rewrite.
|
|
glob: ["web/**"]
|
|
run: just web-fix
|
|
stage_fixed: true
|
|
mobile-fmt:
|
|
glob: ["mobile/**"]
|
|
run: just mobile-fmt
|
|
stage_fixed: true
|
|
|
|
# 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}'
|
|
|
|
pre-push:
|
|
parallel: true
|
|
commands:
|
|
branch-skew:
|
|
run: ./scripts/check-branch-skew.sh
|
|
file-size-check:
|
|
# The ratchet computes its own merge-base diff, so path filtering here
|
|
# would only duplicate policy and create another place for coverage drift.
|
|
run: just file-size-check
|
|
rust-tests:
|
|
glob: ["crates/**", "migrations/**", "schema/**", "Cargo.toml", "Cargo.lock", "rust-toolchain.toml", "deny.toml", "scripts/run-tests.sh", "Justfile"]
|
|
run: just test-unit
|
|
desktop-check:
|
|
glob: ["desktop/**", "pnpm-lock.yaml"]
|
|
exclude: ["desktop/src-tauri/**"]
|
|
run: just desktop-check
|
|
desktop-typecheck:
|
|
glob: ["desktop/**", "pnpm-lock.yaml"]
|
|
exclude: ["desktop/src-tauri/**"]
|
|
run: just desktop-typecheck
|
|
desktop-test:
|
|
glob: ["desktop/**", "pnpm-lock.yaml"]
|
|
exclude: ["desktop/src-tauri/**"]
|
|
run: just desktop-test
|
|
desktop-tauri-checks:
|
|
# Keep local lint parity with Desktop Core CI for every path that can
|
|
# 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.
|
|
glob: ["desktop/src-tauri/**", "crates/**", "migrations/**", "schema/**", "Cargo.toml", "Cargo.lock", "rust-toolchain.toml", "deny.toml", "scripts/run-tests.sh", "Justfile"]
|
|
run: just desktop-tauri-clippy && just desktop-tauri-test
|
|
mobile-checks:
|
|
# Run analysis and tests serially so parallel pre-push hooks do not
|
|
# contend for shared Flutter state (.dart_tool, shader bundle).
|
|
glob: ["mobile/**"]
|
|
run: just mobile-check && just mobile-test
|