Skip to content

Commit 17d0b70

Browse files
committed
[CI] Add weekly conformance run against latest upstream release
The PR pipeline only catches conformance changes when someone opens a PR. Upstream `@modelcontextprotocol/conformance` releases between PRs go untested. This adds a weekly cron + `workflow_dispatch` trigger pinned to `@latest`, and opens a tracking issue on scheduled failures.
1 parent 06917f6 commit 17d0b70

1 file changed

Lines changed: 98 additions & 0 deletions

File tree

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: conformance-weekly
2+
3+
# Runs the MCP conformance suite weekly against the latest
4+
# @modelcontextprotocol/conformance release. The on:pull_request pipeline
5+
# pins to whatever version is available at PR time; this schedule catches
6+
# upstream releases that add scenarios between PRs.
7+
on:
8+
schedule:
9+
- cron: '0 6 * * 1' # Mondays 06:00 UTC
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
issues: write
15+
16+
jobs:
17+
server:
18+
name: conformance / server (latest)
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v6
22+
- uses: actions/setup-node@v6
23+
with:
24+
node-version: '22'
25+
- run: composer install --prefer-dist --no-progress --no-interaction
26+
- name: Start conformance server
27+
run: |
28+
mkdir -p tests/Conformance/sessions tests/Conformance/logs
29+
chmod -R 777 tests/Conformance/sessions tests/Conformance/logs
30+
docker compose -f tests/Conformance/Fixtures/docker-compose.yml up -d
31+
sleep 5
32+
- name: Run conformance tests
33+
working-directory: ./tests/Conformance
34+
run: npx --yes @modelcontextprotocol/conformance@latest server --url http://localhost:8000/ --expected-failures conformance-baseline.yml
35+
- name: Show docker logs on failure
36+
if: failure()
37+
run: docker compose -f tests/Conformance/Fixtures/docker-compose.yml logs
38+
- name: Upload conformance results
39+
if: failure()
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: conformance-server-results
43+
path: |
44+
tests/Conformance/logs
45+
tests/Conformance/results
46+
47+
client:
48+
name: conformance / client (latest)
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v6
52+
- uses: shivammathur/setup-php@v2
53+
with:
54+
php-version: '8.4'
55+
coverage: none
56+
- uses: actions/setup-node@v6
57+
with:
58+
node-version: '22'
59+
- run: composer install --prefer-dist --no-progress --no-interaction
60+
- run: mkdir -p tests/Conformance/logs
61+
- name: Run conformance tests
62+
working-directory: ./tests/Conformance
63+
run: npx --yes @modelcontextprotocol/conformance@latest client --command "php ${{ github.workspace }}/tests/Conformance/client.php" --suite all --expected-failures conformance-baseline.yml
64+
- name: Upload conformance results
65+
if: failure()
66+
uses: actions/upload-artifact@v4
67+
with:
68+
name: conformance-client-results
69+
path: |
70+
tests/Conformance/logs
71+
tests/Conformance/results
72+
73+
notify:
74+
name: Open issue on failure
75+
runs-on: ubuntu-latest
76+
needs: [server, client]
77+
if: failure() && github.event_name == 'schedule'
78+
env:
79+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
GH_REPO: ${{ github.repository }}
81+
RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
82+
steps:
83+
- name: File or comment tracking issue
84+
run: |
85+
existing=$(gh issue list --label conformance-weekly --state open --json number --jq '.[0].number // empty')
86+
if [ -n "$existing" ]; then
87+
gh issue comment "$existing" --body "New failure on $(date -u +%FT%TZ): $RUN_URL"
88+
else
89+
gh issue create \
90+
--title '[conformance] Weekly conformance run failed' \
91+
--label conformance-weekly \
92+
--body "Weekly conformance against \`@modelcontextprotocol/conformance@latest\` failed.
93+
94+
- Run: $RUN_URL
95+
- Triggered: $(date -u +%FT%TZ)
96+
97+
Upstream likely published a release whose scenarios the SDK does not satisfy. Either fix the SDK, update the conformance fixtures, or add the new failure to \`tests/Conformance/conformance-baseline.yml\`."
98+
fi

0 commit comments

Comments
 (0)