Skip to content

.NET: CI Build time end to end improvement#4208

Open
westey-m wants to merge 17 commits intomainfrom
feature-xunit3-mtp-upgrade
Open

.NET: CI Build time end to end improvement#4208
westey-m wants to merge 17 commits intomainfrom
feature-xunit3-mtp-upgrade

Conversation

@westey-m
Copy link
Contributor

@westey-m westey-m commented Feb 24, 2026

Motivation and Context

Our builds are slow and needs improvement.

Description

  • Upgrade to XUnit 3 and Microsoft Testing Platform to allow more parallel execution options
  • Split Build and Test into parallel Jobs, so that Test only needs to build src and tests and not samples
  • Instead of running tests in a loop with filtering per project, we generate a new filtered slnx upfront, which we can point the test runner at, which runs all tests in parallel.
  • Builds with integration tests are down from ~25m to ~13m.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@markwallace-microsoft markwallace-microsoft added documentation Improvements or additions to documentation .NET labels Feb 24, 2026
@westey-m westey-m changed the title .NET: Upgrade to XUnit 3 and Microsoft Testing Platform .NET: CI Build time end to end improvement Feb 25, 2026
@westey-m westey-m marked this pull request as ready for review February 25, 2026 14:05
Copilot AI review requested due to automatic review settings February 25, 2026 14:05
Copy link
Member

@rogerbarreto rogerbarreto Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest putting this in dotnet/eng/scripts

Create-Filtered-Solution.ps1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only other ps build script we have (dotnet-check-coverage.ps1) is in .github/workflows.

Copy link
Member

@rogerbarreto rogerbarreto Feb 25, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would suggest moving both then.

Normally the pattern I see in MEAI and OpenAI is having a scripts folder, not necessarily within the eng.

https://github.com/openai/openai-dotnet/blob/d732f31616ea59926f211bdedb2dfd88f1c6ef36/.github/workflows/update-generator.yml#L73

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the .NET test stack and CI pipeline to reduce end-to-end build time by moving to xUnit v3 on Microsoft Testing Platform and running build/test work in parallel with solution filtering.

Changes:

  • Migrate .NET tests to xUnit v3 + Microsoft Testing Platform (MTP), including updated async lifetime signatures and skip patterns.
  • Split CI into parallel build-only and test jobs; generate filtered solutions to avoid building samples for test runs.
  • Switch coverage collection to Microsoft.Testing.Extensions.CodeCoverage with a shared .runsettings file and updated report globbing.

Reviewed changes

Copilot reviewed 115 out of 115 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
dotnet/tests/coverage.runsettings Adds MTP code coverage settings (attribute exclusions).
dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseRunTests.cs Replace attribute-based skipping with runtime skip calls for overridden conformance tests.
dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseRunStreamingTests.cs Same skip pattern change for streaming conformance tests.
dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseFixture.cs Update fixture async lifetime to ValueTask and add disposal pattern.
dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseChatClientAgentRunTests.cs Replace [Fact(Skip=...)] overrides with runtime skip calls.
dotnet/tests/OpenAIResponse.IntegrationTests/OpenAIResponseChatClientAgentRunStreamingTests.cs Same as above for streaming.
dotnet/tests/OpenAIChatCompletion.IntegrationTests/OpenAIChatCompletionFixture.cs Update fixture async lifetime to ValueTask + suppress finalization.
dotnet/tests/OpenAIAssistant.IntegrationTests/OpenAIAssistantFixture.cs Update fixture async lifetime to ValueTask; wrap delete task in ValueTask.
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/WorkflowTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/TestOutputAdapter.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/PowerFx/WorkflowExpressionEngineTests.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/PowerFx/TemplateExtensionsTests.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/PowerFx/RecalcEngineTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/PowerFx/RecalcEngineFactoryTests.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/WorkflowActionExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/SetVariableExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/SetTextVariableExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/SetMultipleVariablesExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/SendActivityExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/RetrieveConversationMessagesExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/RetrieveConversationMessageExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/ResetVariableExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/RequestExternalInputExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/QuestionExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/ParseValueExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/InvokeFunctionToolExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/ForeachExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/EditTableV2ExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/EditTableExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/DefaultActionExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/CreateConversationExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/CopyConversationMessagesExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/ConditionGroupExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/ClearAllVariablesExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/AddConversationMessageExecutorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Interpreter/WorkflowModelTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Events/ExternalInputResponseTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Events/ExternalInputRequestTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Events/EventTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Entities/EntityExtractorTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/Entities/EntityExtractionResultTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/DeclarativeWorkflowTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/DeclarativeWorkflowExceptionTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/WorkflowActionTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/SetVariableTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/SetTextVariableTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/SetMultipleVariablesTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/RetrieveConversationMessagesTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/RetrieveConversationMessageTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ResetVariableTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ProviderTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/InvokeAzureAgentTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/GotoTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ForeachTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/EndDialogTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/EndConversationTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/EdgeTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/DeclarativeEjectionTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/CreateConversationTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/CopyConversationMessagesTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ContinueLoopTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ConditionGroupTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/ClearAllVariablesTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/BreakLoopTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/CodeGen/AddConversationMessageTemplateTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/MediaInputTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/InvokeFunctionToolWorkflowTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/FunctionCallingWorkflowTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/WorkflowTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/TestOutputAdapter.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/Framework/IntegrationTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeWorkflowTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/DeclarativeCodeGenTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Workflows.Declarative.IntegrationTests/AzureAgentProviderTest.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs Convert async lifetime + add sample build step and --no-build runs.
dotnet/tests/Microsoft.Agents.AI.Hosting.AGUI.AspNetCore.IntegrationTests/ToolCallingTests.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TimeToLiveTests.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/TestHelper.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/OrchestrationTests.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/Logging/TestLoggerProvider.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/Logging/TestLogger.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/ExternalClientTests.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/ConsoleAppSamplesValidation.cs Convert async lifetime + add sample build step and --no-build runs.
dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/AgentEntityTests.cs Remove xUnit abstractions import (xUnit v3 migration cleanup).
dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/Microsoft.Agents.AI.CosmosNoSql.UnitTests.csproj Remove Xunit.SkippableFact package reference.
dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosCheckpointStoreTests.cs Migrate to ValueTask lifetime + replace skippable facts with runtime skip.
dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosChatHistoryProviderTests.cs Migrate to ValueTask lifetime + replace skippable facts with runtime skip.
dotnet/tests/Directory.Build.props Switch test infra packages to xUnit v3 MTP + MTP coverage extension.
dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioRunTests.cs Change skip behavior to runtime skipping and conditional manual verification.
dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioRunStreamingTests.cs Same as above for streaming.
dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudioFixture.cs Make fixture skip when config missing; migrate to ValueTask lifetime.
dotnet/tests/CopilotStudio.IntegrationTests/CopilotStudio.IntegrationTests.csproj Add warning suppression for updated test runner/tooling.
dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentStructuredOutputRunTests.cs Convert skip pattern to runtime skipping for flaky tests.
dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistentFixture.cs Migrate to ValueTask async lifetime + cleanup.
dotnet/tests/AzureAIAgentsPersistent.IntegrationTests/AzureAIAgentsPersistent.IntegrationTests.csproj Add warning suppression for updated test runner/tooling.
dotnet/tests/AzureAI.IntegrationTests/AzureAI.IntegrationTests.csproj Add warning suppression for updated test runner/tooling.
dotnet/tests/AzureAI.IntegrationTests/AIProjectClientFixture.cs Migrate fixture async lifetime to ValueTask and wrap delete task.
dotnet/tests/AzureAI.IntegrationTests/AIProjectClientChatClientAgentRunTests.cs Convert “skip” to runtime skip call.
dotnet/tests/AzureAI.IntegrationTests/AIProjectClientChatClientAgentRunStreamingTests.cs Convert “skip” to runtime skip call.
dotnet/tests/AzureAI.IntegrationTests/AIProjectClientAgentStructuredOutputRunTests.cs Convert “skip” to runtime skip call + update structured-output fixture init to ValueTask.
dotnet/tests/AzureAI.IntegrationTests/AIProjectClientAgentRunTests.cs Convert “skip” to runtime skip call(s).
dotnet/tests/AzureAI.IntegrationTests/AIProjectClientAgentRunStreamingTests.cs Convert “skip” to runtime skip call(s).
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicSkillsIntegrationTests.cs Move config load inside tests and runtime-skip local-only tests.
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionRunTests.cs Remove “skip-all” wrapper base and rely on fixture/test runtime skipping.
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionRunStreamingTests.cs Same as above for streaming.
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionFixture.cs Runtime-skip local-only tests; migrate async lifetime to ValueTask.
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionChatClientAgentRunTests.cs Remove “skip-all” wrapper base and rely on runtime skipping.
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletionChatClientAgentRunStreamingTests.cs Same as above for streaming.
dotnet/tests/AnthropicChatCompletion.IntegrationTests/AnthropicChatCompletion.IntegrationTests.csproj Add warning suppression for updated test runner/tooling.
dotnet/tests/AgentConformance.IntegrationTests/AgentTests.cs Update base test fixture lifecycle to xUnit v3 ValueTask pattern.
dotnet/global.json Configure Microsoft Testing Platform runner for dotnet test.
dotnet/Directory.Packages.props Update/replace test-related package versions for xUnit v3 + MTP + coverage extension.
dotnet/.github/skills/build-and-test/SKILL.md Update local dev instructions for MTP CLI syntax and coverage usage.
.github/workflows/dotnet-build-and-test.yml Split build/test into parallel jobs; add filtered-solution generation and MTP coverage/test args.
.github/workflows/New-FilteredSolution.ps1 New script to generate framework/test-type filtered .slnx solutions for CI.
Comments suppressed due to low confidence (4)

dotnet/tests/Microsoft.Agents.AI.Hosting.AzureFunctions.IntegrationTests/SamplesValidation.cs:51

  • SamplesValidation implements IAsyncLifetime, but the dispose method is implemented as IAsyncDisposable.DisposeAsync(). If IAsyncLifetime expects DisposeAsync() (as other tests in this PR do), this won’t satisfy the interface and the cleanup hook won’t run. Implement ValueTask IAsyncLifetime.DisposeAsync() (or a public ValueTask DisposeAsync()), and remove the IAsyncDisposable explicit implementation unless the type explicitly implements IAsyncDisposable too.
    dotnet/tests/Microsoft.Agents.AI.DurableTask.IntegrationTests/ConsoleAppSamplesValidation.cs:45
  • ConsoleAppSamplesValidation implements IAsyncLifetime, but the dispose method is implemented as IAsyncDisposable.DisposeAsync(). This likely doesn’t fulfill IAsyncLifetime.DisposeAsync() and can prevent xUnit from calling the fixture teardown. Implement ValueTask IAsyncLifetime.DisposeAsync() (or a public ValueTask DisposeAsync()), consistent with other updated fixtures in this PR.
    dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosCheckpointStoreTests.cs:66
  • InitializeAsync calls SkipIfEmulatorNotAvailable() before attempting the connection check that sets _emulatorAvailable. As written, local runs will always skip unless COSMOS_EMULATOR_AVAILABLE=true is set, regardless of whether the emulator is actually reachable. Consider moving the skip decision after the connection attempt (or make SkipIfEmulatorNotAvailable only consult the env var during CI).
    public async ValueTask InitializeAsync()
    {
        // Fail fast if emulator is not available
        this.SkipIfEmulatorNotAvailable();

        // Check environment variable to determine if we should preserve containers
        // Set COSMOS_PRESERVE_CONTAINERS=true to keep containers and data for inspection
        this._preserveContainer = string.Equals(Environment.GetEnvironmentVariable("COSMOS_PRESERVE_CONTAINERS"), "true", StringComparison.OrdinalIgnoreCase);

dotnet/tests/Microsoft.Agents.AI.CosmosNoSql.UnitTests/CosmosChatHistoryProviderTests.cs:71

  • InitializeAsync calls SkipIfEmulatorNotAvailable() before the connection attempt that sets _emulatorAvailable, so the “Locally: skip if connection check failed” path can’t work. This causes local runs to always skip unless COSMOS_EMULATOR_AVAILABLE=true is set. Move the skip check after the connection attempt, or adjust the skip logic so local availability is determined by the try/catch connection test.
    public async ValueTask InitializeAsync()
    {
        // Fail fast if emulator is not available
        this.SkipIfEmulatorNotAvailable();

        // Check environment variable to determine if we should preserve containers
        // Set COSMOS_PRESERVE_CONTAINERS=true to keep containers and data for inspection
        this._preserveContainer = string.Equals(Environment.GetEnvironmentVariable("COSMOS_PRESERVE_CONTAINERS"), "true", StringComparison.OrdinalIgnoreCase);

        this._connectionString = $"AccountEndpoint={s_emulatorEndpoint};AccountKey={s_emulatorKey}";

@rogerbarreto
Copy link
Member

image I see double checks running for both `push` and `pull_request` should we have just the `pull_request` running in this context ?

@rogerbarreto
Copy link
Member

CAn we generate the build/solution artifact and use that in the tests later se we can skip build during tests and use the actual built artifact straight away, gaining even more time back?

@westey-m
Copy link
Contributor Author

Can we generate the build/solution artifact and use that in the tests later se we can skip build during tests and use the actual built artifact straight away, gaining even more time back?

This would require having tests depend on building everything, which is what we were doing before. Building everything takes up to 9 mins, while building just src and tests take around 2 mins. Its therefore faster to just build src/tests (2mins) and then run the tests (6/7mins), rather than building everything (9mins) and then running the tests (6/7mins). The build now builds everything in parallel to building and running just tests.

@westey-m
Copy link
Contributor Author

westey-m commented Feb 25, 2026

I see double checks running for both push and pull_request should we have just the pull_request running in this context ?

This is unrelated existing behavior and is because this is a feature branch. See here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation .NET

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants