Forked from Forthena (PERSONAL/forthena) and retargeted: - NO login, NO LLM: the edition is public and the ranking is deterministic (stories that name Sen. BAM lead; freshest first) — Daniel: no like/dislike or store profile for visitors. - Crawler scoped to BAM: Bing news keyword queries + Inquirer/Rappler fallback wires, with a two-tier relevance gate (named-BAM always; Aquino+legislative-context only from fallback) so op-eds and non-Bam senators are dropped. - Desks: BAM (lead), Gaming, Education, Politics, Energy, PH, Business. - Community board /board: 'Thank you Senator BAM' — nickname-only posts, HTML-stripped, URL-only rejected, IP rate-limited (3/10min, 20/day). - Yellow-gamer theme (Orbitron/Rajdhani/JetBrains Mono, dark + gold, HUD corners), supporter disclaimer in header and footer. - Tests: category/date/relevance/text suites + Mongo board suite + full HTTP e2e (all passing). Infra: 66.181.46.132 (bidaangmamamayan.com), local Mongo 7.0, nginx + certbot TLS, PM2 bama (:3000) + 15-min crawl cron.
17 lines
686 B
Bash
17 lines
686 B
Bash
#!/usr/bin/env bash
|
|
# Bama test runner — the self-contained suites only (no Mongo, no build).
|
|
# The board + e2e suites need a scratch Mongo and a built app:
|
|
# MONGODB_URI=mongodb://127.0.0.1:27099/bama node tests/board-test.mjs
|
|
# node tests/e2e-run.mjs
|
|
set -u
|
|
cd "$(dirname "$0")/.."
|
|
fail=0
|
|
for t in tests/date-test.mjs tests/category-test.mjs tests/relevance-test.mjs tests/text-test.mjs; do
|
|
name=$(basename "$t")
|
|
out=$(timeout 120 node "$t" 2>&1)
|
|
code=$?
|
|
if [ $code -eq 0 ]; then printf 'PASS %s\n' "$name"; else printf 'FAIL %s (exit %s)\n%s\n' "$name" "$code" "$out"; fail=1; fi
|
|
done
|
|
[ $fail -eq 0 ] && echo "ALL SUITES PASS" || echo "SOME SUITES FAILED"
|
|
exit $fail
|