Files
apex-mcp-server/.github/workflows/ci.yml
FilipBl4gojevic 9d4958500e test: add tool-inventory smoke test asserting the 23-tool surface
Every PR in the non-custodial-split series is supposed to preserve
`tools/list` returning 23 tools with identical schemas, but nothing
enforced it — PRs 2, 6, 7 and 8 will restructure and rename tool
families, and a snapshot only means something if it's taken before
that starts. Boot the built server, call listTools(), and assert both
the count and the exact sorted name list against a checked-in
baseline captured from a live run on this branch. Failures report
which names were added/removed rather than a bare array-diff.

Reuses startServer()/stopServer() from test/setup.ts; does not call
getMnemonic(), so it needs no wallet. Wired into CI as a new step
after the unit tests. Also raises the server-start timeout in
setup.ts from 15s to 60s — the Cardano WASM import makes cold starts
slow enough that 15s was flaky on the smoke test's first CI run.

test:smoke is intentionally separate from test:unit (which does not
build) since startServer() spawns build/index.js.
2026-07-28 09:57:02 +02:00

37 lines
706 B
YAML

name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
env:
NODE_OPTIONS: --max-old-space-size=12288
- name: Unit tests
run: npm run test:unit
env:
NODE_OPTIONS: --max-old-space-size=12288
- name: Tool inventory smoke test
run: npm run test:smoke
env:
NODE_OPTIONS: --max-old-space-size=12288