memlnaut-nisps/scripts/run-all-tests.sh
monkey-w1n5t0n 0d1a2102eb feat(manifold)!: P1 — retire playground/, manifold is the sole browser app
Playground archived at branch archive/playground-solidjs (tag
playground-solidjs-final) and deleted from main. Retargets:

- run-all-tests.sh stage 5 → manifold (typecheck + bun test + build +
  playwright via non-snap node runner, BUILD-PLAN gotcha)
- ci.yml playground-tests → manifold-tests; osc-bridge.yml → manifold/osc-bridge
  (was already broken: playground/osc-bridge no longer existed)
- codegen: TS emission target removed (returns at P5 → manifold); golden
  test now C++-only; TS emitters retained dormant
- .gitignore: manifold/osc-bridge paths; drop dead playground faust exception
- docs: AGENTS.md gates, README quickstart, MAP.md, ALIGNMENT.md (C15 now
  archive-only — defect #1 updated), AGENT-REFERENCE.md, specs/MAIN.md

Part of docs/specs/plans/one-core-engine-refactor.md P1.
2026-07-13 23:27:56 +02:00

67 lines
2.3 KiB
Bash
Executable file

#!/usr/bin/env bash
# scripts/run-all-tests.sh — master entrypoint that exercises every check
# stream 11 owns. Designed to be the single command CI invokes.
#
# Stages (each fails fast):
# 1. C++ build + ctest → scripts/build-cpp-tests.sh
# 2. WASM build → scripts/build-wasm.sh
# 3. Parity check → scripts/parity-check.sh
# 4. Lint → scripts/lint-cpp.sh
# 5. Manifold tests → cd manifold && typecheck + build + bun test + playwright
#
# Flags via env:
# NISPS_SKIP_PLAYWRIGHT=1 skip the Playwright leg (useful in C++-only loops)
# NISPS_SKIP_WASM=1 skip WASM build + parity (no emcc available)
# NISPS_LINT_STRICT=1 treat lint warnings as failures
# PLAYWRIGHT_BROWSERS_PATH respected (on the VPS point it at the snap-bun
# browser cache — see docs/specs/plans/BUILD-PLAN.md)
#
# Exit codes: 0 on full success, otherwise the failing stage's exit code.
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
cd "$ROOT"
stage() { printf '\n=== %s ===\n' "$1"; }
stage "1/5 C++ build + ctest"
"$ROOT/scripts/build-cpp-tests.sh"
if [[ "${NISPS_SKIP_WASM:-0}" != "1" ]]; then
stage "2/5 WASM build"
"$ROOT/scripts/build-wasm.sh"
stage "3/5 parity check"
"$ROOT/scripts/parity-check.sh"
else
stage "2/5 WASM build (skipped: NISPS_SKIP_WASM=1)"
stage "3/5 parity check (skipped: NISPS_SKIP_WASM=1)"
fi
stage "4/5 lint"
"$ROOT/scripts/lint-cpp.sh"
if [[ "${NISPS_SKIP_PLAYWRIGHT:-0}" != "1" ]]; then
stage "5/5 manifold tests"
if ! command -v bun >/dev/null 2>&1; then
echo "[run-all-tests] bun not on PATH; skipping manifold stage"
else
(
cd "$ROOT/manifold"
bun install --frozen-lockfile 2>/dev/null || bun install
bun run typecheck
bun run test
bun run build
# The Playwright RUNNER goes through non-snap node: snap-confined
# bun cannot see host browser libraries (BUILD-PLAN gotcha).
# Ensure browsers are present. `--with-deps` is heavy; leave to CI.
node node_modules/.bin/playwright install chromium >/dev/null 2>&1 || true
node node_modules/.bin/playwright test
)
fi
else
stage "5/5 manifold tests (skipped: NISPS_SKIP_PLAYWRIGHT=1)"
fi
stage "ALL GREEN"