Skip to content

Commit 9deb100

Browse files
committed
Update CI conformance tests from 0.1.10 to 0.1.11
1 parent 008d07c commit 9deb100

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

.github/workflows/ci-build-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969

7070
# Keep version in sync with McpConformanceVersion in Directory.Packages.props
7171
- name: 📦 Install conformance test runner
72-
run: npm install @modelcontextprotocol/conformance@0.1.10
72+
run: npm install @modelcontextprotocol/conformance@0.1.11
7373

7474
- name: 🏗️ Build
7575
run: make build CONFIGURATION=${{ matrix.configuration }}

tests/ModelContextProtocol.AspNetCore.Tests/ClientConformanceTests.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Diagnostics;
2+
using System.Reflection;
23
using System.Text;
34
using System.Text.RegularExpressions;
45
using ModelContextProtocol.Tests.Utils;
@@ -53,11 +54,16 @@ public ClientConformanceTests(ITestOutputHelper output)
5354
"auth/client-credentials-basic"
5455
];
5556

57+
private static string GetConformanceVersion() =>
58+
typeof(ClientConformanceTests).Assembly.GetCustomAttributes<AssemblyMetadataAttribute>().FirstOrDefault(a => a.Key is "McpConformanceVersion")?.Value ??
59+
throw new InvalidOperationException("McpConformanceVersion not found in assembly metadata");
60+
5661
[Fact(Skip = "npx is not installed. Skipping client conformance tests.", SkipUnless = nameof(IsNpxInstalled))]
5762
public async Task VerifyAllConformanceTestsAreListed()
5863
{
5964
// Get the list of available conformance tests from the suite
60-
var startInfo = NodeHelpers.NpxStartInfo("-y @modelcontextprotocol/conformance list --client");
65+
// Version is configured in Directory.Packages.props for central management
66+
var startInfo = NodeHelpers.NpxStartInfo($"-y @modelcontextprotocol/conformance@{GetConformanceVersion()} list --client");
6167

6268
var outputBuilder = new StringBuilder();
6369
var process = new Process { StartInfo = startInfo };
@@ -180,7 +186,8 @@ public async Task RunConformanceTest(string scenario)
180186
$"ConformanceClient executable not found at: {conformanceClientPath}");
181187
}
182188

183-
var startInfo = NodeHelpers.NpxStartInfo($"-y @modelcontextprotocol/conformance client --scenario {scenario} --command \"{conformanceClientPath} {scenario}\"");
189+
// Version is configured in Directory.Packages.props for central management
190+
var startInfo = NodeHelpers.NpxStartInfo($"-y @modelcontextprotocol/conformance@{GetConformanceVersion()} client --scenario {scenario} --command \"{conformanceClientPath} {scenario}\"");
184191

185192
var outputBuilder = new StringBuilder();
186193
var errorBuilder = new StringBuilder();

0 commit comments

Comments
 (0)