SPB Git

Repository Public

ci.sh 1.4 KB 41 lines shellscript

1#!/bin/bash2# Agent OS — the checks that must be green before a deploy.3#4#   scripts/ci.sh         build, typecheck, every unit suite (needs local Postgres on /tmp; no model call)5#   scripts/ci.sh --e2e   + Playwright against the dev mock, + the REAL end-to-end suite against the6#                           dev stack (real models: costs money, needs ~/.config/agent-os/dev.env)7set -euo pipefail89ROOT="$(cd "$(dirname "$0")/.." && pwd)"10cd "$ROOT"11E2E=012[ "${1:-}" = "--e2e" ] && E2E=113# Unit suites never call a model.14unset AOS_LIVE_TESTS1516step() { printf '\n== %s ==\n' "$1"; }1718step "build"19pnpm -r --workspace-concurrency=1 build20step "typecheck"21pnpm -r --workspace-concurrency=1 typecheck22step "unit tests"23pnpm -r --workspace-concurrency=1 test2425if [ "$E2E" = 1 ]; then26  step "playwright (dev mock)"27  (cd apps/web && NEXT_PUBLIC_E2E=1 pnpm build && pnpm exec playwright test)28  step "production web build (no test hook)"29  pnpm --filter @aos/web build30  if grep -rq "__aos" apps/web/out; then echo "test hook found in apps/web/out" >&2; exit 1; fi31  step "playwright (real stack, real models)"32  (cd apps/web && pnpm exec playwright test -c playwright.real.config.ts)33fi3435if [ "$E2E" = 0 ]; then36  # `pnpm -r build` above already produced the production export; make sure no test hook is in it37  step "production web build has no test hook"38  if grep -rq "__aos" apps/web/out; then echo "test hook found in apps/web/out" >&2; exit 1; fi39fi40printf '\nci: all green\n'41
Files main
Menu

Theme