ci: add GitHub Actions pipeline and MCP server tests - #5
Merged
Conversation
The repo had no CI, so the only check on Renovate PRs was renovate/stability-days, which gates on release age and never compiles anything. Two open major bumps went unverified as a result. Add .github/workflows/ci.yml with two parallel jobs: - mcp (ubuntu-latest): npm ci, typecheck, build, test - swift (macos-26): swift build --build-tests, swift test Add an integration test suite for the MCP server under mcp/test/. The tests spawn the built server over stdio and point it at a local HTTP server standing in for the Swift bridge, so they exercise the real binary without needing a refactor of src/index.ts: - tools.test.js asserts the advertised tool surface, required fields, enum constraints and descriptions survive schema generation - requests.test.js asserts method, path, query string, body shape and error mapping for representative tool calls Assertions deliberately avoid zod-version-specific details (issue wording, additionalProperties) so they track behaviour rather than codegen incidentals. Also add typecheck/pretest/test scripts and exclude test/ from the published package. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The repo has no CI. The only check on Renovate PRs is
renovate/stability-days, which gates on release age and never compiles anything — so #1 and #2 both sat as "green" majors with nothing verifying them.What
.github/workflows/ci.yml, two parallel jobs on PR + push tomain:mcpubuntu-latestnpm ci→npm run typecheck→npm run build→npm testswiftmacos-26swift build --build-tests→swift testConcurrency group cancels superseded runs.
permissions: contents: read.MCP test suite
mcp/had zero tests. Addedmcp/test/using the built-innode:testrunner — no new dependencies to bump.The tests spawn the built server over stdio via the SDK client and point
APPLE_BRIDGE_URLat a local HTTP server that records requests. That exercises the real binary and needed no refactor ofsrc/index.ts.tools.test.js— advertised tool surface, required fields, enum constraints, descriptionsrequests.test.js— method, path, query string, body shape, 204 handling, error mapping, argument validation21 tests. Assertions avoid zod-version-specific details (issue wording,
additionalProperties) so they track behaviour, not codegen incidentals.Verified against the open majors
Ran this suite against both Renovate branches locally:
npm run typecheckexits 2 with fourTS2591: Cannot find name 'process'errors. TS6 stopped auto-including@types/*; the fix is"types": ["node"]inmcp/tsconfig.json, which follows in a separate PR.Swift suite passes headless locally: 47 tests, 5 suites.
Note
macos-26is required —Package.swiftpinsswift-tools-version: 6.3, which older runner images don't ship. Theswift --versionstep is there to make a toolchain mismatch obvious if the label needs adjusting.🤖 Generated with Claude Code