Skip to content

ci: add GitHub Actions pipeline and MCP server tests - #5

Merged
tobydoescode merged 1 commit into
mainfrom
ci/add-github-actions
Jul 28, 2026
Merged

ci: add GitHub Actions pipeline and MCP server tests#5
tobydoescode merged 1 commit into
mainfrom
ci/add-github-actions

Conversation

@tobydoescode

Copy link
Copy Markdown
Owner

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 to main:

Job Runner Steps
mcp ubuntu-latest npm cinpm run typechecknpm run buildnpm test
swift macos-26 swift build --build-testsswift test

Concurrency group cancels superseded runs. permissions: contents: read.

MCP test suite

mcp/ had zero tests. Added mcp/test/ using the built-in node:test runner — no new dependencies to bump.

The tests spawn the built server over stdio via the SDK client and point APPLE_BRIDGE_URL at a local HTTP server that records requests. That exercises the real binary and needed no refactor of src/index.ts.

  • tools.test.js — advertised tool surface, required fields, enum constraints, descriptions
  • requests.test.js — method, path, query string, body shape, 204 handling, error mapping, argument validation

21 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:

Swift suite passes headless locally: 47 tests, 5 suites.

Note

macos-26 is required — Package.swift pins swift-tools-version: 6.3, which older runner images don't ship. The swift --version step is there to make a toolchain mismatch obvious if the label needs adjusting.

🤖 Generated with Claude Code

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>
@tobydoescode
tobydoescode merged commit ad6489a into main Jul 28, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant