diff --git a/sdk/cs/src/Microsoft.AI.Foundry.Local.csproj b/sdk/cs/src/Microsoft.AI.Foundry.Local.csproj index 384b4415..588da1e9 100644 --- a/sdk/cs/src/Microsoft.AI.Foundry.Local.csproj +++ b/sdk/cs/src/Microsoft.AI.Foundry.Local.csproj @@ -15,6 +15,7 @@ git net8.0;netstandard2.0 + win-x64;win-arm64;linux-x64;osx-arm64 true enable True @@ -107,6 +108,10 @@ + + + + diff --git a/sdk/cs/test/FoundryLocal.Tests/AudioClientTests.cs b/sdk/cs/test/FoundryLocal.Tests/AudioClientTests.cs index 0a048811..4466c5fa 100644 --- a/sdk/cs/test/FoundryLocal.Tests/AudioClientTests.cs +++ b/sdk/cs/test/FoundryLocal.Tests/AudioClientTests.cs @@ -10,7 +10,6 @@ namespace Microsoft.AI.Foundry.Local.Tests; using System.Threading.Tasks; -[SkipUnlessIntegration] internal sealed class AudioClientTests { private static IModel? model; diff --git a/sdk/cs/test/FoundryLocal.Tests/ChatCompletionsTests.cs b/sdk/cs/test/FoundryLocal.Tests/ChatCompletionsTests.cs index 21578147..7e70c683 100644 --- a/sdk/cs/test/FoundryLocal.Tests/ChatCompletionsTests.cs +++ b/sdk/cs/test/FoundryLocal.Tests/ChatCompletionsTests.cs @@ -13,7 +13,6 @@ namespace Microsoft.AI.Foundry.Local.Tests; using Betalgo.Ranul.OpenAI.ObjectModels.ResponseModels; using Betalgo.Ranul.OpenAI.ObjectModels.SharedModels; -[SkipUnlessIntegration] internal sealed class ChatCompletionsTests { private static IModel? model; diff --git a/sdk/cs/test/FoundryLocal.Tests/EmbeddingClientTests.cs b/sdk/cs/test/FoundryLocal.Tests/EmbeddingClientTests.cs index bed3a8ea..a5123cb0 100644 --- a/sdk/cs/test/FoundryLocal.Tests/EmbeddingClientTests.cs +++ b/sdk/cs/test/FoundryLocal.Tests/EmbeddingClientTests.cs @@ -8,7 +8,6 @@ namespace Microsoft.AI.Foundry.Local.Tests; using System.Threading.Tasks; -[SkipUnlessIntegration] internal sealed class EmbeddingClientTests { private static IModel? model; diff --git a/sdk/cs/test/FoundryLocal.Tests/EndToEnd.cs b/sdk/cs/test/FoundryLocal.Tests/EndToEnd.cs index 1b4019ba..56c70769 100644 --- a/sdk/cs/test/FoundryLocal.Tests/EndToEnd.cs +++ b/sdk/cs/test/FoundryLocal.Tests/EndToEnd.cs @@ -8,7 +8,6 @@ namespace Microsoft.AI.Foundry.Local.Tests; using System; using System.Threading.Tasks; -[SkipUnlessIntegration] internal sealed class EndToEnd { // end-to-end using real catalog. run manually as a standalone test as it alters the model cache. diff --git a/sdk/cs/test/FoundryLocal.Tests/FoundryLocalManagerTest.cs b/sdk/cs/test/FoundryLocal.Tests/FoundryLocalManagerTest.cs index 2aa29d18..cd7e7793 100644 --- a/sdk/cs/test/FoundryLocal.Tests/FoundryLocalManagerTest.cs +++ b/sdk/cs/test/FoundryLocal.Tests/FoundryLocalManagerTest.cs @@ -11,7 +11,6 @@ namespace Microsoft.AI.Foundry.Local.Tests; using Microsoft.AI.Foundry.Local; using Microsoft.AI.Foundry.Local.Detail; -[SkipUnlessIntegration] public class FoundryLocalManagerTests { [Test] diff --git a/sdk/cs/test/FoundryLocal.Tests/LiveAudioTranscriptionTests.cs b/sdk/cs/test/FoundryLocal.Tests/LiveAudioTranscriptionTests.cs index 3c56fc51..07fd67ea 100644 --- a/sdk/cs/test/FoundryLocal.Tests/LiveAudioTranscriptionTests.cs +++ b/sdk/cs/test/FoundryLocal.Tests/LiveAudioTranscriptionTests.cs @@ -133,7 +133,6 @@ public async Task CoreErrorResponse_TryParse_TransientError() // --- Session state guard tests --- [Test] - [SkipUnlessIntegration] public async Task AppendAsync_BeforeStart_Throws() { await using var session = new LiveAudioTranscriptionSession("test-model"); @@ -153,7 +152,6 @@ public async Task AppendAsync_BeforeStart_Throws() } [Test] - [SkipUnlessIntegration] public async Task GetTranscriptionStream_BeforeStart_Throws() { await using var session = new LiveAudioTranscriptionSession("test-model"); @@ -177,7 +175,6 @@ public async Task GetTranscriptionStream_BeforeStart_Throws() // --- E2E streaming test with synthetic PCM audio --- [Test] - [SkipUnlessIntegration] public async Task LiveStreaming_E2E_WithSyntheticPCM_ReturnsValidResponse() { diff --git a/sdk/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj b/sdk/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj index 5280da42..8e39fa64 100644 --- a/sdk/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj +++ b/sdk/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj @@ -23,6 +23,13 @@ win-x64 + + + $(NETCoreSdkRuntimeIdentifier) + + net8.0-windows10.0.26100.0; 10.0.17763.0 diff --git a/sdk/cs/test/FoundryLocal.Tests/SkipInCIAttribute.cs b/sdk/cs/test/FoundryLocal.Tests/SkipInCIAttribute.cs deleted file mode 100644 index c4d17e5b..00000000 --- a/sdk/cs/test/FoundryLocal.Tests/SkipInCIAttribute.cs +++ /dev/null @@ -1,19 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) Microsoft. All rights reserved. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace Microsoft.AI.Foundry.Local.Tests; - -using TUnit.Core; - -using System.Threading.Tasks; - -public class SkipInCIAttribute() : SkipAttribute("This test is only supported locally. Skipped on CIs.") -{ - public override Task ShouldSkip(TestRegisteredContext context) - { - return Task.FromResult(Utils.IsRunningInCI()); - } -} diff --git a/sdk/cs/test/FoundryLocal.Tests/SkipUnlessIntegrationAttribute.cs b/sdk/cs/test/FoundryLocal.Tests/SkipUnlessIntegrationAttribute.cs deleted file mode 100644 index 7125c765..00000000 --- a/sdk/cs/test/FoundryLocal.Tests/SkipUnlessIntegrationAttribute.cs +++ /dev/null @@ -1,20 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) Microsoft. All rights reserved. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace Microsoft.AI.Foundry.Local.Tests; - -using TUnit.Core; - -using System.Threading.Tasks; - -public class SkipUnlessIntegrationAttribute() - : SkipAttribute("Integration test infrastructure not available. See LOCAL_MODEL_TESTING.md for setup instructions.") -{ - public override Task ShouldSkip(TestRegisteredContext context) - { - return Task.FromResult(!Utils.IntegrationTestsAvailable); - } -} diff --git a/sdk/cs/test/FoundryLocal.Tests/SkipUnlessIntegrationTests.cs b/sdk/cs/test/FoundryLocal.Tests/SkipUnlessIntegrationTests.cs deleted file mode 100644 index 1d882bdb..00000000 --- a/sdk/cs/test/FoundryLocal.Tests/SkipUnlessIntegrationTests.cs +++ /dev/null @@ -1,34 +0,0 @@ -// -------------------------------------------------------------------------------------------------------------------- -// -// Copyright (c) Microsoft. All rights reserved. -// -// -------------------------------------------------------------------------------------------------------------------- - -namespace Microsoft.AI.Foundry.Local.Tests; - -using System.Threading.Tasks; - -internal sealed class SkipUnlessIntegrationTests -{ - [Test] - public async Task ShouldSkip_ReturnsTrue_WhenIntegrationTestsNotAvailable() - { - // IntegrationTestsAvailable is set during assembly init. - // Without test-data-shared, it will be false and ShouldSkip returns true. - // With test-data-shared, it will be true and ShouldSkip returns false. - // Either way, it should be the inverse of IntegrationTestsAvailable. - - var attr = new SkipUnlessIntegrationAttribute(); - var shouldSkip = await attr.ShouldSkip(null!); - - await Assert.That(shouldSkip).IsEqualTo(!Utils.IntegrationTestsAvailable); - } - - [Test] - public async Task SkipReason_ContainsSetupInstructions() - { - var attr = new SkipUnlessIntegrationAttribute(); - - await Assert.That(attr.Reason).Contains("LOCAL_MODEL_TESTING.md"); - } -}