Files
faunosteo/scripts/check-all.sh
T
bchanot f2cf93668e chore(workspace): native Rust toolchain as the primary path, builder image as the reproducible alternative
scripts/rust-check.sh and scripts/wasm-build.sh (moved from docker/) run
natively on the user-level rustup toolchain pinned by rust-toolchain.toml;
scripts/rust-env.sh puts ~/.cargo/bin on PATH for non-interactive shells.
Root scripts: rust:check and wasm:build native, rust:check:docker and
wasm:build:docker through docker/rust-run.sh, check:all = scripts/check-all.sh,
the whole pre-merge gate in one command (rust check, types drift, wasm build,
pnpm check, application image, worker:test, worker:image started read-only).
The native check now runs the worker's unit tests (cargo test --workspace);
the sandbox tests stay feature-gated and Docker-only.
2026-10-13 01:19:13 +02:00

33 lines
1.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Every technical check a branch must pass before a merge, in one command: `pnpm check:all`.
# It runs on the development machine; no CI is configured on the forge today, and a future
# runner calls these same stages (docs/development/RUST.md §4). Stops at the first failure.
# Needs the native Rust toolchain (RUST.md §1) and Docker for the image stages. The local
# Supabase stack is not required: the SQL suite runs on PGlite inside `pnpm test:run`, and
# `pnpm db:test` is the real-stack complement after a change under supabase/.
set -euo pipefail
cd "$(dirname "$0")/.."
stage() {
printf '\n== %s (%s)\n' "$1" "$(date +%H:%M:%S)"
}
stage "rust: fmt, clippy, tests, ts-rs export, cargo-deny (native toolchain)"
bash scripts/rust-check.sh
stage "rust: committed TypeScript types match the Rust contracts"
git diff --exit-code -- packages/core-wasm/types
stage "wasm: browser module (the core-wasm proofs run on it in the Node pipeline)"
bash scripts/wasm-build.sh
stage "node: typecheck, tests, lint, build"
pnpm check
stage "docker: application image"
docker build -t faunosteo:check .
stage "docker: worker sandbox tests and seccomp derivation on the musl binary that ships"
pnpm worker:test
stage "docker: worker runtime image starts read-only"
pnpm worker:image
docker run --rm --read-only --cap-drop ALL --security-opt no-new-privileges:true \
faunosteo_worker:dev run --check
stage "all checks passed"