Skip to content

Commit

Permalink
Run only UnitTests on Windows & MacOs in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
vipentti committed Dec 8, 2023
1 parent c3297c9 commit aca044c
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,21 @@ public T From<T>()

public Solution CurrentSolution => From<IHazSolution>().Solution;

public IEnumerable<Project> TestProjects => CurrentSolution.GetAllProjects("*Tests*");
public bool IsMacOs =>
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.OSX);

public bool IsWindows =>
System.Runtime.InteropServices.RuntimeInformation.IsOSPlatform(System.Runtime.InteropServices.OSPlatform.Windows);

public IEnumerable<Project> UnitTests =>
CurrentSolution.GetAllProjects("*UnitTests");

public IEnumerable<Project> ExecutionTests =>
CurrentSolution.GetAllProjects("*ExecutionTests");

// Run only unit tests in CI on Windows & MacOS beecause execution tests take a while.
public IEnumerable<Project> TestProjects =>
IsServerBuild && (IsMacOs || IsWindows) ? UnitTests : UnitTests.Concat(ExecutionTests);

bool IUseCsharpier.UseGlobalTool => false;
bool IUseFantomas.UseGlobalTool => false;
Expand Down

0 comments on commit aca044c

Please sign in to comment.