Revert "Revert "Update to MTP"" (#990)
This commit is contained in:
parent
a559bfb891
commit
c94cb895a7
8 changed files with 42 additions and 82 deletions
1
.github/dependabot.yml
vendored
1
.github/dependabot.yml
vendored
|
|
@ -17,6 +17,7 @@ updates:
|
|||
patterns:
|
||||
- "xunit.*"
|
||||
- "Microsoft.NET.Test.Sdk"
|
||||
- "Microsoft.Testing.*"
|
||||
- "coverlet.*"
|
||||
- "GitHubActionsTestLogger"
|
||||
- "Moq"
|
||||
|
|
|
|||
|
|
@ -11,6 +11,10 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- This works around issues with dotnet test which are fixed in https://github.com/dotnet/sdk/pull/51794 -->
|
||||
<!-- It can be safely removed once .NET SDK 10.0.101 is out and is used in the repo -->
|
||||
<Configuration Condition="'$(Configuration)' == ''">Debug</Configuration>
|
||||
|
||||
<RepoRoot>$([System.IO.Path]::GetFullPath('$(MSBuildThisFileDirectory)'))</RepoRoot>
|
||||
<ArtifactsDir Condition="'$(ArtifactsDir)' == ''">$([MSBuild]::NormalizeDirectory('$(RepoRoot)', 'artifacts'))</ArtifactsDir>
|
||||
<ArtifactsObjDir>$([MSBuild]::NormalizeDirectory('$(ArtifactsDir)', 'obj'))</ArtifactsObjDir>
|
||||
|
|
@ -29,8 +33,9 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<VSTestLogger Condition="'$(VSTestLogger)' == ''">trx%3bLogFileName=$(MSBuildProjectName).$(TargetFramework).$(OS).trx</VSTestLogger>
|
||||
<VSTestResultsDirectory Condition="'$(VSTestResultsDirectory)' == ''">$(ArtifactsTestResultsDir)</VSTestResultsDirectory>
|
||||
<UseMicrosoftTestingPlatformRunner>true</UseMicrosoftTestingPlatformRunner>
|
||||
<_MTPResultsDirectory>$(ArtifactsTestResultsDir)</_MTPResultsDirectory>
|
||||
<TestingPlatformCommandLineArguments>$(TestingPlatformCommandLineArguments) --results-directory $(_MTPResultsDirectory) --report-trx --report-trx-filename $(MSBuildProjectName).$(TargetFramework).$(OS).trx</TestingPlatformCommandLineArguments>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(GITHUB_ACTIONS)' == 'true'">
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
<System8Version>8.0.22</System8Version>
|
||||
<System9Version>9.0.11</System9Version>
|
||||
<System10Version>10.0.0</System10Version>
|
||||
<MicrosoftTestingPlatformVersion>2.0.2</MicrosoftTestingPlatformVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- Product dependencies shared -->
|
||||
|
|
@ -60,11 +61,10 @@
|
|||
<!-- Testing dependencies -->
|
||||
<ItemGroup>
|
||||
<PackageVersion Include="Anthropic.SDK" Version="5.8.0" />
|
||||
<PackageVersion Include="coverlet.collector" Version="6.0.4">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageVersion>
|
||||
<PackageVersion Include="GitHubActionsTestLogger" Version="2.4.1" />
|
||||
<PackageVersion Include="Microsoft.Testing.Extensions.CodeCoverage" Version="18.1.0" />
|
||||
<PackageVersion Include="Microsoft.Testing.Extensions.HangDump" Version="$(MicrosoftTestingPlatformVersion)" />
|
||||
<PackageVersion Include="Microsoft.Testing.Extensions.CrashDump" Version="$(MicrosoftTestingPlatformVersion)" />
|
||||
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="$(MicrosoftTestingPlatformVersion)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.AI.OpenAI" Version="10.0.0-preview.1.25559.3" />
|
||||
<PackageVersion Include="Microsoft.Extensions.DependencyInjection" Version="$(System10Version)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Hosting" Version="$(System10Version)" />
|
||||
|
|
@ -72,7 +72,6 @@
|
|||
<PackageVersion Include="Microsoft.Extensions.Logging.Console" Version="$(System10Version)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.Options" Version="$(System10Version)" />
|
||||
<PackageVersion Include="Microsoft.Extensions.TimeProvider.Testing" Version="$(System10Version)" />
|
||||
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.0.1" />
|
||||
<PackageVersion Include="Moq" Version="4.20.72" />
|
||||
<PackageVersion Include="OpenTelemetry" Version="1.14.0" />
|
||||
<PackageVersion Include="OpenTelemetry.Exporter.InMemory" Version="1.14.0" />
|
||||
|
|
@ -87,8 +86,7 @@
|
|||
<PackageVersion Include="Serilog.Sinks.File" Version="7.0.0" />
|
||||
<PackageVersion Include="Serilog" Version="4.3.0" />
|
||||
<PackageVersion Include="System.Linq.AsyncEnumerable" Version="$(System10Version)" />
|
||||
<PackageVersion Include="xunit.v3" Version="3.2.0" />
|
||||
<PackageVersion Include="xunit.runner.visualstudio" Version="3.1.5" />
|
||||
<PackageVersion Include="xunit.v3.mtp-v2" Version="3.2.0" />
|
||||
<PackageVersion Include="System.Net.Http" Version="4.3.4" />
|
||||
<PackageVersion Include="JsonSchema.Net" Version="7.4.0" />
|
||||
</ItemGroup>
|
||||
|
|
|
|||
19
Makefile
19
Makefile
|
|
@ -18,18 +18,15 @@ build: restore
|
|||
test: build
|
||||
dotnet test \
|
||||
--no-build \
|
||||
--no-progress \
|
||||
--configuration $(CONFIGURATION) \
|
||||
--filter '(Execution!=Manual)' \
|
||||
--blame \
|
||||
--blame-crash \
|
||||
--blame-hang-timeout 7m \
|
||||
--diag "$(ARTIFACT_PATH)/diag.txt" \
|
||||
--logger "trx" \
|
||||
--logger "GitHubActions;summary.includePassedTests=true;summary.includeSkippedTests=true" \
|
||||
--collect "XPlat Code Coverage" \
|
||||
--results-directory $(ARTIFACT_PATH)/testresults \
|
||||
-- \
|
||||
RunConfiguration.CollectSourceInformation=true
|
||||
--filter-not-trait 'Execution=Manual' \
|
||||
--crashdump \
|
||||
--hangdump \
|
||||
--hangdump-timeout 7m \
|
||||
--coverage \
|
||||
--coverage-output-format cobertura \
|
||||
-p:_MTPResultsDirectory=$(ARTIFACT_PATH)/testresults \
|
||||
|
||||
pack: restore
|
||||
dotnet pack --no-restore --configuration $(CONFIGURATION)
|
||||
|
|
|
|||
|
|
@ -2,5 +2,8 @@
|
|||
"sdk": {
|
||||
"version": "10.0.100",
|
||||
"rollForward": "minor"
|
||||
},
|
||||
"test": {
|
||||
"runner": "Microsoft.Testing.Platform"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,29 +3,20 @@
|
|||
<PropertyGroup>
|
||||
<TargetFramework>net9.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<OutputType>Exe</OutputType>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="GitHubActionsTestLogger">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" />
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" />
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.CrashDump" />
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" />
|
||||
<PackageReference Include="Microsoft.CodeAnalysis.Analyzers">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||
<PackageReference Include="xunit.v3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="xunit.v3.mtp-v2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -4,8 +4,7 @@
|
|||
<TargetFrameworks>net10.0;net9.0;net8.0</TargetFrameworks>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>ModelContextProtocol.AspNetCore.Tests</RootNamespace>
|
||||
</PropertyGroup>
|
||||
|
||||
|
|
@ -14,41 +13,25 @@
|
|||
<JsonSerializerIsReflectionEnabledByDefault>false</JsonSerializerIsReflectionEnabledByDefault>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Without this, tests are currently not showing results until all tests complete
|
||||
https://xunit.net/docs/getting-started/v3/microsoft-testing-platform
|
||||
-->
|
||||
<DisableTestingPlatformServerCapability>true</DisableTestingPlatformServerCapability>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Common\**\*.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="GitHubActionsTestLogger">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" />
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" />
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.CrashDump" />
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" />
|
||||
<PackageReference Include="Microsoft.Extensions.AI" />
|
||||
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
|
||||
<PackageReference Include="Microsoft.Extensions.TimeProvider.Testing" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||
<PackageReference Include="Moq" />
|
||||
<PackageReference Include="OpenTelemetry" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.InMemory" />
|
||||
<PackageReference Include="xunit.v3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="xunit.v3.mtp-v2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net10.0'))">
|
||||
|
|
|
|||
|
|
@ -6,8 +6,6 @@
|
|||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<RootNamespace>ModelContextProtocol.Tests</RootNamespace>
|
||||
<!-- https://github.com/dotnet/sdk/issues/51060 -->
|
||||
<NoWarn>$(NoWarn);NU1903;NU1902</NoWarn>
|
||||
|
|
@ -18,13 +16,6 @@
|
|||
<JsonSerializerIsReflectionEnabledByDefault>false</JsonSerializerIsReflectionEnabledByDefault>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<!-- Without this, tests are currently not showing results until all tests complete
|
||||
https://xunit.net/docs/getting-started/v3/microsoft-testing-platform
|
||||
-->
|
||||
<DisableTestingPlatformServerCapability>true</DisableTestingPlatformServerCapability>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="..\Common\**\*.cs" />
|
||||
</ItemGroup>
|
||||
|
|
@ -35,29 +26,20 @@
|
|||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="coverlet.collector">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="GitHubActionsTestLogger">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.CodeCoverage" />
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.HangDump" />
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.CrashDump" />
|
||||
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
|
||||
<PackageReference Include="Microsoft.Extensions.AI" />
|
||||
<PackageReference Include="Microsoft.Extensions.AI.OpenAI" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging.Console" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" />
|
||||
<PackageReference Include="Moq" />
|
||||
<PackageReference Include="OpenTelemetry" />
|
||||
<PackageReference Include="OpenTelemetry.Exporter.InMemory" />
|
||||
<PackageReference Include="Serilog" />
|
||||
<PackageReference Include="JsonSchema.Net" />
|
||||
<PackageReference Include="xunit.v3" />
|
||||
<PackageReference Include="xunit.runner.visualstudio">
|
||||
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="xunit.v3.mtp-v2" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net10.0'))">
|
||||
|
|
|
|||
Loading…
Reference in a new issue