Skip to content

Commit

Permalink
test: Added ability to ignore local tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
HavenDV committed Nov 2, 2023
1 parent acee82b commit bb880d9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions LangChain.sln
Original file line number Diff line number Diff line change
Expand Up @@ -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}"
Expand Down
7 changes: 7 additions & 0 deletions src/tests/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project>

<PropertyGroup Condition="'$(CI)' == 'true'">
<DefineConstants>$(DefineConstants);CONTINUOUS_INTEGRATION_BUILD</DefineConstants>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit bb880d9

Please sign in to comment.