colibri/scripts/ci-checks.sh

30 lines
719 B
Bash
Raw Permalink Normal View History

#!/bin/sh
# Run every repository gate, the same set CI runs. Use this before pushing.
#
# ./scripts/ci-checks.sh
#
# Gates: rustfmt, clippy (warnings = errors), workspace tests, markdown format,
# wiki-lint (dangling refs, resurrected old names, orphan pages).
set -eu
ROOT_DIR="$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)"
cd "$ROOT_DIR"
echo "==> cargo fmt --check"
cargo fmt --check
echo "==> cargo clippy --workspace --all-targets -- -D warnings"
cargo clippy --workspace --all-targets -- -D warnings
echo "==> cargo test --workspace"
cargo test --workspace
echo "==> markdown format gate"
./scripts/check-format.sh
echo "==> wiki-lint --strict"
./scripts/wiki-lint --strict
echo "All checks passed."