The pre-push gate ran the self-hosted claw relay (ssh + Lima Debian) as a hard stage, so any time the host was unreachable the whole hook failed and the only way past it was a blanket --no-verify, which also discarded the local macOS Swift gate. The authoritative Linux gate is the GitHub-hosted workflow (ubuntu-latest + swift:6.2); the relay is a convenience fallback. check-linux.sh now separates connectivity and provisioning (Stage A, exit 77 to signal skip when the relay is unavailable) from the relayed build and test (Stage B, exit 1 on a genuine Linux failure). check-all.sh treats 77 as a non-fatal skip and still aborts on any other non-zero, so a runner outage no longer blocks a green push and never masks a real failure.
41 lines
1.3 KiB
Bash
Executable File
41 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Full local verification gate for PureYAML.
|
|
#
|
|
# Runs the checks required before completion, including the Claw Mini Linux
|
|
# check when executed from macOS and the WASM SDK build check.
|
|
|
|
set -euo pipefail
|
|
|
|
# Exit code 77 from a gate means "skipped: runner/infrastructure unavailable"
|
|
# (see scripts/check-linux.sh). A skip is non-fatal and must not block the
|
|
# push; a real failure (any other non-zero) still aborts the whole gate.
|
|
SKIP=77
|
|
|
|
run_gate() {
|
|
name="$1"
|
|
shift
|
|
printf '\n==> %s\n' "$name"
|
|
set +e
|
|
"$@"
|
|
status=$?
|
|
set -e
|
|
if [ "$status" -eq "$SKIP" ]; then
|
|
printf ' SKIPPED (runner unavailable; authoritative gate runs on CI)\n'
|
|
return 0
|
|
fi
|
|
return "$status"
|
|
}
|
|
|
|
run_gate "style" bash scripts/check-style.sh
|
|
run_gate "namespacing" bash scripts/check-namespacing.sh
|
|
run_gate "validation coverage" bash scripts/check-validation-coverage.sh
|
|
run_gate "forbidden patterns" bash scripts/check-forbidden-patterns.sh
|
|
run_gate "changelog" bash scripts/check-changelog-touched.sh
|
|
run_gate "roadmap" bash scripts/check-roadmap.sh
|
|
run_gate "swiftformat" swiftformat . --config .swiftformat --lint
|
|
run_gate "swiftlint" swiftlint --config .swiftlint.yml --strict
|
|
run_gate "swift build" swift build
|
|
run_gate "swift test" swift test
|
|
run_gate "linux" bash scripts/check-linux.sh
|
|
run_gate "wasm" bash scripts/check-wasm.sh
|