mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Co-authored-by: npub1ux8n2yfs8qfvgd75s7kyhar2mztac355v6vmrz4juc9l3msw4pgstums9e <e18f3511303812c437d487ac4bf46ad897dc46946699b18ab2e60bf8ee0ea851@sprout-oss.stage.blox.sqprod.co> Signed-off-by: npub1ux8n2yfs8qfvgd75s7kyhar2mztac355v6vmrz4juc9l3msw4pgstums9e <e18f3511303812c437d487ac4bf46ad897dc46946699b18ab2e60bf8ee0ea851@sprout-oss.stage.blox.sqprod.co>
51 lines
2.0 KiB
YAML
51 lines
2.0 KiB
YAML
pre-commit:
|
|
parallel: true
|
|
commands:
|
|
rust-fmt:
|
|
run: just fmt
|
|
stage_fixed: true
|
|
desktop-tauri-fmt:
|
|
run: just desktop-tauri-fmt
|
|
stage_fixed: true
|
|
desktop-fix:
|
|
run: just desktop-fix
|
|
stage_fixed: true
|
|
web-fix:
|
|
run: just web-fix
|
|
stage_fixed: true
|
|
mobile-fix:
|
|
run: just mobile-fix
|
|
stage_fixed: true
|
|
|
|
pre-push:
|
|
parallel: true
|
|
# Compare the commit being pushed with its configured push ref. This two-endpoint
|
|
# diff may over-select after divergence, which is safer; CI remains authoritative.
|
|
# On detection failure (including a new branch without an upstream), lefthook.yml
|
|
# is the sentinel that runs every suite. Every command glob must keep this path.
|
|
files: |
|
|
sh -c '
|
|
push_ref=$(git rev-parse --verify "@{push}" 2>/dev/null) || {
|
|
echo "warning: cannot resolve @{push}; running all pre-push test suites" >&2
|
|
printf "%s\n" lefthook.yml
|
|
exit 0
|
|
}
|
|
git -c core.quotePath=false diff --name-only "$push_ref" HEAD || {
|
|
echo "warning: cannot detect pushed files; running all pre-push test suites" >&2
|
|
printf "%s\n" lefthook.yml
|
|
}
|
|
'
|
|
commands:
|
|
rust-tests:
|
|
glob: "{crates/**,migrations/**,schema/**,Cargo.toml,Cargo.lock,rust-toolchain.toml,deny.toml,.github/workflows/ci.yml,scripts/run-tests.sh,justfile,lefthook.yml}"
|
|
run: 'just test-unit && : {files}'
|
|
desktop-test:
|
|
glob: "{desktop/**,pnpm-lock.yaml,crates/**,migrations/**,schema/**,Cargo.toml,Cargo.lock,rust-toolchain.toml,deny.toml,.github/workflows/ci.yml,scripts/run-tests.sh,justfile,lefthook.yml}"
|
|
run: 'just desktop-test && : {files}'
|
|
desktop-tauri-test:
|
|
glob: "{desktop/**,pnpm-lock.yaml,crates/**,migrations/**,schema/**,Cargo.toml,Cargo.lock,rust-toolchain.toml,deny.toml,.github/workflows/ci.yml,scripts/run-tests.sh,justfile,lefthook.yml}"
|
|
run: 'just desktop-tauri-test && : {files}'
|
|
mobile-test:
|
|
glob: "{mobile/**,.github/workflows/ci.yml,lefthook.yml}"
|
|
run: 'just mobile-test && : {files}'
|