colibri/scripts/ci-checks.sh
Sam & Claude fe8551f010
Some checks failed
CI / rust (pull_request) Has been cancelled
CI / markdown (pull_request) Has been cancelled
ci: add Forgejo Actions gate (fmt, clippy, tests, markdown) (Sam & Claude)
colibri had no CI, so a non-compiling main slipped through (the build-break PR
#23 had to fix) and the markdown gate from #22 was honor-system only.

- .forgejo/workflows/ci.yml: runs on push-to-main + PRs. Two jobs — rust
  (cargo fmt --check, clippy -D warnings, cargo test --workspace) and markdown
  (./scripts/check-format.sh).
- scripts/ci-checks.sh: same gates in one script, runnable locally before
  pushing (the workflow and humans share it).

Validated: scripts/ci-checks.sh passes end-to-end on this branch (exit 0).

NOTE: requires a registered Forgejo Actions runner with an `ubuntu-latest`
label that can pull the rust/node images. Adjust runs-on to match the runner.
Stacked on `all-checks-green` (the fmt fix) so the first CI run is green; merge
that PR first.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-04 20:47:00 +02:00

25 lines
593 B
Bash
Executable file

#!/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.
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 "All checks passed."