Skip to content

perf(v3.3.5): fix speed probe 404, health cache 15s, pre-gzip bundles… #29

perf(v3.3.5): fix speed probe 404, health cache 15s, pre-gzip bundles…

perf(v3.3.5): fix speed probe 404, health cache 15s, pre-gzip bundles… #29

Workflow file for this run

name: 🧪 CI — Lint & Health
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
ci:
name: Node ${{ matrix.node }} on ubuntu-latest
runs-on: ubuntu-latest
strategy:
matrix:
# engines: node >=18.0.0 | --env-file needs 20.6+
node: ['20', '22']
fail-fast: false
steps:
- name: ⬇️ Checkout
uses: actions/checkout@v4
- name: 🟢 Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
# No cache — zero npm dependencies, no lockfile
- name: ✅ Syntax check — server.mjs
run: node --check server.mjs
- name: ✅ Syntax check — bin/isotope CLI
run: node --check bin/isotope 2>/dev/null && echo "✅ bin/isotope ok" || echo "⚠️ bin/isotope not checkable (shell script)"
- name: 📋 Schema file sanity check
run: |
echo "=== isotope-complete.sql ==="
echo " Size : $(wc -c < isotope-complete.sql) bytes"
echo " Lines : $(wc -l < isotope-complete.sql)"
echo " Tables : $(grep -c 'CREATE TABLE' isotope-complete.sql)"
echo " Funcs : $(grep -c 'CREATE OR REPLACE FUNCTION' isotope-complete.sql)"
echo " Policies: $(grep -c 'CREATE POLICY' isotope-complete.sql)"
- name: 🔒 No hardcoded secrets check
run: |
if grep -rE 'SUPABASE_SERVICE_ROLE_KEY\s*=\s*eyJ' --include="*.mjs" --include="*.js" .; then
echo "❌ Hardcoded service-role key detected!"
exit 1
fi
echo "✅ No hardcoded secrets"
- name: 📁 Required files present
run: |
for f in server.mjs package.json setup.sh setup.bat isotope-complete.sql .env.example; do
test -f "$f" && echo "✅ $f" || (echo "❌ $f missing" && exit 1)
done
- name: 🚀 Smoke test — server starts and answers /api/health
run: |
SUPABASE_URL=https://placeholder.supabase.co \
SUPABASE_ANON_KEY=placeholder_anon_key \
PORT=3099 \
node server.mjs &
SERVER_PID=$!
echo "Waiting for server (pid $SERVER_PID)..."
sleep 4
STATUS=$(curl -s -o /dev/null -w "%{http_code}" http://127.0.0.1:3099/api/health 2>/dev/null || echo "000")
kill $SERVER_PID 2>/dev/null || true
echo "Health check HTTP status: $STATUS"
# Accept 200 OK or 5xx (server responded — Supabase placeholder is expected to fail)
case "$STATUS" in
2*|4*|5*) echo "✅ Server started and responded" ;;
*) echo "❌ Server did not respond (got $STATUS)" && exit 1 ;;
esac