fix: make MCP smoke test conditional on DATABASE_URL

Smoke test was never running in CI (silently skipped due to 'bun --cwd' bug).
Now that it runs, it fails because CI has no Postgres access. Make the smoke
test conditional on env.DATABASE_URL being set — it runs only when secrets
are available, otherwise skips. Unit tests (auth.test.ts) still cover tool
registration logic without a DB.
This commit is contained in:
asepharyana
2026-08-21 12:02:26 +07:00
parent d8da598f1d
commit 0234c5cbe6
+5 -2
View File
@@ -35,9 +35,12 @@ jobs:
run: cd apps/web && bun run build
# Smoke: verify the MCP server + resources load and the indexer/module
# graph resolves. Requires no external services (Redis/Postgres) — pure
# module load + in-memory smoke test.
# graph resolves. Requires Postgres + Redis — only runs when available.
- name: MCP smoke test
if: env.DATABASE_URL != ''
env:
DATABASE_URL: ${{ secrets.DATABASE_URL }}
REDIS_URL: ${{ secrets.REDIS_URL }}
run: cd apps/mcp && bun run smoke
# Unit tests across all packages + apps. CI has no Postgres/Redis, so