-
Notifications
You must be signed in to change notification settings - Fork 207
172 lines (141 loc) · 4.73 KB
/
conformance.yml
File metadata and controls
172 lines (141 loc) · 4.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name: Conformance Tests
on:
workflow_dispatch:
pull_request:
branches: [ main ]
push:
branches: [ main ]
env:
JAVA_VERSION: '21'
JAVA_DISTRIBUTION: temurin
NODE_VERSION: '22'
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
# Cancel only when the run is NOT on `main` branch
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
server:
runs-on: ubuntu-latest
name: Conformance Server Tests
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Build
run: ./gradlew :conformance-test:installDist
- name: Start server
run: |
MCP_PORT=3001 conformance-test/build/install/conformance-test/bin/conformance-test &
for i in $(seq 1 30); do
if curl -s -o /dev/null http://localhost:3001/mcp; then
echo "Server is ready"
break
fi
sleep 1
done
- name: Run conformance tests
uses: modelcontextprotocol/conformance@v0.1.16
with:
mode: server
url: http://localhost:3001/mcp
suite: active
node-version: ${{ env.NODE_VERSION }}
expected-failures: ./conformance-test/conformance-baseline.yml
client:
runs-on: ubuntu-latest
name: "Conformance Client Tests: ${{ matrix.scenario }}"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
scenario:
- initialize
- tools_call
- elicitation-sep1034-client-defaults
- sse-retry
steps:
- uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Build
run: ./gradlew :conformance-test:installDist
- name: Run conformance tests
uses: modelcontextprotocol/conformance@v0.1.16
with:
mode: client
command: conformance-test/build/install/conformance-test/bin/conformance-client
scenario: ${{ matrix.scenario }}
node-version: ${{ env.NODE_VERSION }}
expected-failures: ./conformance-test/conformance-baseline.yml
auth:
runs-on: ubuntu-latest
name: Conformance Auth Tests
timeout-minutes: 20
steps:
- uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Build
run: ./gradlew :conformance-test:installDist
- name: Run conformance tests
uses: modelcontextprotocol/conformance@v0.1.16
with:
mode: client
command: conformance-test/build/install/conformance-test/bin/conformance-client
suite: auth
node-version: ${{ env.NODE_VERSION }}
expected-failures: ./conformance-test/conformance-baseline.yml
auth-scenarios:
runs-on: ubuntu-latest
name: "Conformance Auth Scenario: ${{ matrix.scenario }}"
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
scenario:
- auth/client-credentials-jwt
- auth/client-credentials-basic
- auth/cross-app-access-complete-flow
steps:
- uses: actions/checkout@v6
- name: Set up JDK
uses: actions/setup-java@v5
with:
java-version: ${{ env.JAVA_VERSION }}
distribution: ${{ env.JAVA_DISTRIBUTION }}
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v6
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' }}
- name: Build
run: ./gradlew :conformance-test:installDist
- name: Run conformance tests
uses: modelcontextprotocol/conformance@v0.1.16
with:
mode: client
command: conformance-test/build/install/conformance-test/bin/conformance-client
scenario: ${{ matrix.scenario }}
node-version: ${{ env.NODE_VERSION }}
expected-failures: ./conformance-test/conformance-baseline.yml