Commit Graph
6 Commits
Author SHA1 Message Date
asepharyana 628068e33d fix: CI build steps — use 'cd X && bun run' not 'bun --cwd'
Root cause: 'bun run' subcommand does NOT support --cwd flag. Both
'Build web' and 'MCP smoke test' steps used 'bun --cwd apps/X run build/smoke'
which silently printed usage and exited 0 — no actual build/test ran.
This meant:
1. No .next/ was produced → artifact upload found no files → deploy failed
2. Smoke test was silently skipped

Fix: use 'cd apps/X && bun run Y' pattern instead.
2026-08-21 11:53:15 +07:00
asepharyana 074fa9f316 fix: merge CI + Deploy into single workflow (fixes artifact sharing)
CI / typecheck + build (push) Canceled after 0s
CI / deploy to VPS (push) Canceled after 0s
The workflow_run trigger can't access artifacts from the CI run — this
is a known GitHub Actions limitation. Merged deploy into ci.yml as a
'needs: build' job so artifacts are shared properly.

Key changes:
- ci.yml: unified build+deploy workflow
- Build job: typecheck, build web, test, smoke, upload .next artifact
- Deploy job (needs: build): download artifact, SCP to VPS, git pull +
  index + restart. No build on VPS.
- artifact retention: 1 day (only needed for immediate deploy)
2026-08-21 11:49:22 +07:00
asepharyana 77792c624b fix: CI/CD — move web build to CI, VPS only deploys (no build on VPS)
- ci.yml: add web build step + upload .next as artifact
- deploy.yml: download artifact via SCP, copy to VPS .next dir
  (no bun run build on VPS — only git pull + install + index + restart)
- Bump actions/checkout@v4 → @v5 (Node 20 deprecation)
- Revert next.config standalone mode (not needed for .next/ copy approach)
- Remove broken bun --cwd (doesn't support --cwd flag)
2026-08-21 11:43:21 +07:00
asepharyana 90e40c4d48 fix: CI/CD — replace broken bun --cwd with turbo --filter for web build
CI / typecheck + build (turbo) (push) Canceled after 0s
The deploy workflow used 'bun --cwd apps/web run build' which does NOT
work — 'bun run' doesn't support --cwd flag. Bun prints usage and exits
0, making the step silently succeed without building. Fix: use
'bun run build --filter=@mcpedia/web' (turbo workspace filtering).

Also bump actions/checkout@v4→v5 to resolve Node 20 deprecation warning.
2026-08-21 11:20:06 +07:00
asepharyana 76f778c10d chore(testing): Phase 9 — bun:test suite + CI gating with no-DB fakes
CI / typecheck + build (turbo) (push) Canceled after 0s
Added a real test suite (32 tests, 0 external services) using bun:test with
in-process module mocking for @mcpedia/db, @mcpedia/queue, @mcpedia/core.

Enablers:
- apps/api: extracted createApp(deps?) factory + dashboard.ts module from
  index.ts so the HTTP surface is unit-testable (real queue is lazy-imported).
- packages/core: exported shouldCreateRevision pure predicate; restoreRevision
  gained an opts.reindex seam for the chunk-rebuild contract.
- apps/mcp: renamed smoke.test.ts -> smoke.ts (bun test now owns .test.ts),
  updated stale assertions (10 tools, 4 docs in docs section).
- infra: turbo test task (cache:false), test scripts across packages,
  @types/bun + tsconfig base types, CI 'Test' step after Build.

Packages with tests: embeddings(5), parser(5), search(8), core(4),
mcp(6 auth-gates), api(8 contracts).

All green: typecheck(4/4), test(6/6 pkgs), build(web). Live API verified
/health, /metrics, /dashboard, /hooks/* auth gate on temp port.
2026-08-20 11:12:32 +07:00
asepharyana a659ebeec2 ci: add GitHub Actions workflow (Bun + turbo typecheck/build + MCP smoke)
CI / typecheck + build (turbo) (push) Canceled after 0s
Builds the whole monorepo on push/PR to main: bun install --frozen-lockfile,
turbo typecheck, turbo build (incl. Next.js web prerender), and the MCP
in-memory smoke test. No external services required for CI.
2026-08-19 22:10:47 +07:00