From bb880d914adf4c3b0fc9b7de7db85bca544d0f2b Mon Sep 17 00:00:00 2001 From: HavenDV Date: Fri, 3 Nov 2023 00:31:03 +0400 Subject: [PATCH] test: Added ability to ignore local tests. --- LangChain.sln | 1 + src/tests/Directory.Build.targets | 7 +++++++ .../LangChain.Providers.OpenAI.IntegrationTests/Tests.cs | 3 +++ 3 files changed, 11 insertions(+) create mode 100644 src/tests/Directory.Build.targets diff --git a/LangChain.sln b/LangChain.sln index 190b3af2..e1026b4d 100644 --- a/LangChain.sln +++ b/LangChain.sln @@ -40,6 +40,7 @@ EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{FDEE2E22-C239-4921-83B2-9797F765FD6A}" ProjectSection(SolutionItems) = preProject src\tests\Directory.Build.props = src\tests\Directory.Build.props + src\tests\Directory.Build.targets = src\tests\Directory.Build.targets EndProjectSection EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LangChain.Splitters.CSharp.UnitTests", "src\tests\LangChain.Splitters.CSharp.UnitTests\LangChain.Splitters.CSharp.UnitTests.csproj", "{C9D4A93D-3256-4E24-8054-87C03350A151}" diff --git a/src/tests/Directory.Build.targets b/src/tests/Directory.Build.targets new file mode 100644 index 00000000..ce5b95bc --- /dev/null +++ b/src/tests/Directory.Build.targets @@ -0,0 +1,7 @@ + + + + $(DefineConstants);CONTINUOUS_INTEGRATION_BUILD + + + \ No newline at end of file diff --git a/src/tests/LangChain.Providers.OpenAI.IntegrationTests/Tests.cs b/src/tests/LangChain.Providers.OpenAI.IntegrationTests/Tests.cs index 3ae8c1af..b3d67b42 100755 --- a/src/tests/LangChain.Providers.OpenAI.IntegrationTests/Tests.cs +++ b/src/tests/LangChain.Providers.OpenAI.IntegrationTests/Tests.cs @@ -4,6 +4,9 @@ namespace LangChain.Providers.OpenAI.IntegrationTests; public class GeneralTests { [TestMethod] +#if CONTINUOUS_INTEGRATION_BUILD + [Ignore] +#endif public async Task GetWeather() { var apiKey =