Repository Public
1#!/bin/bash2# CLIP continuous-integration gate. Run before every push (installed as a git pre-push hook by scripts/install-hooks.sh):3# typecheck → lint → unit tests → production build → secrets scan → (optional) end-to-end tests4# E2E runs when PW_BASE_URL is set, e.g. PW_BASE_URL=https://clip.spboucher.ai scripts/ci.sh5set -euo pipefail6export PATH="/opt/homebrew/bin:$PATH" NEXT_TELEMETRY_DISABLED=17cd "$(dirname "$0")/.."8step() { printf '\n── %s\n' "$1"; }9step "typecheck"; node_modules/.bin/tsc --noEmit10step "lint"; node_modules/.bin/eslint src scripts tests e2e11step "unit tests"; node_modules/.bin/vitest run12step "build"; node_modules/.bin/next build | tail -413step "secrets scan"; node_modules/.bin/tsx scripts/secrets-scan.ts14if [ -n "${PW_BASE_URL:-}" ]; then step "end-to-end ($PW_BASE_URL)"; node_modules/.bin/playwright test --workers=4; fi15printf '\nCI passed\n'16