Skip to content

Commit 1014d9f

Browse files
authored
feat: add client conformance testing (#1360)
1 parent 3466a9e commit 1014d9f

File tree

7 files changed

+759
-2
lines changed

7 files changed

+759
-2
lines changed

.github/workflows/conformance.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Conformance Tests
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
workflow_dispatch:
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
client-conformance:
14+
runs-on: ubuntu-latest
15+
continue-on-error: true # Non-blocking initially
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Install pnpm
19+
uses: pnpm/action-setup@v4
20+
with:
21+
run_install: false
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 24
25+
cache: pnpm
26+
cache-dependency-path: pnpm-lock.yaml
27+
- run: pnpm install
28+
- run: pnpm run build:all
29+
- run: pnpm run test:conformance:client:all

package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@
2929
"lint:all": "pnpm -r lint",
3030
"lint:fix:all": "pnpm -r lint:fix",
3131
"check:all": "pnpm -r typecheck && pnpm -r lint",
32-
"test:all": "pnpm -r test"
32+
"test:all": "pnpm -r test",
33+
"test:conformance:client": "conformance client --command 'npx tsx src/conformance/everything-client.ts'",
34+
"test:conformance:client:all": "conformance client --command 'npx tsx src/conformance/everything-client.ts' --suite all",
35+
"test:conformance:client:run": "npx tsx src/conformance/everything-client.ts"
3336
},
3437
"devDependencies": {
3538
"@cfworker/json-schema": "catalog:runtimeShared",
3639
"@changesets/changelog-github": "^0.5.2",
3740
"@changesets/cli": "^2.29.8",
3841
"@eslint/js": "catalog:devTools",
42+
"@modelcontextprotocol/client": "workspace:^",
43+
"@modelcontextprotocol/conformance": "0.1.9",
3944
"@types/content-type": "catalog:devTools",
4045
"@types/cors": "catalog:devTools",
4146
"@types/cross-spawn": "catalog:devTools",
@@ -56,7 +61,8 @@
5661
"typescript": "catalog:devTools",
5762
"typescript-eslint": "catalog:devTools",
5863
"vitest": "catalog:devTools",
59-
"ws": "catalog:devTools"
64+
"ws": "catalog:devTools",
65+
"zod": "catalog:runtimeShared"
6066
},
6167
"resolutions": {
6268
"strip-ansi": "6.0.1"

pnpm-lock.yaml

Lines changed: 66 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)