Skip to content

Commit

Permalink
Add GitHubActionsTestLogger
Browse files Browse the repository at this point in the history
Add GitHubActionsTestLogger for builds in GitHub Actions.
Contributes to App-vNext#980.
  • Loading branch information
martincostello committed Jan 6, 2023
1 parent 50ef916 commit 7a8d8f4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions build.cake
Original file line number Diff line number Diff line change
Expand Up @@ -211,11 +211,19 @@ Task("__BuildSolutions")
Task("__RunTests")
.Does(() =>
{
var loggers = Array.Empty<string>();
if (!string.IsNullOrWhiteSpace(Environment.GetEnvironmentVariable("GITHUB_SHA")))
{
loggers = new[] { "GitHubActions;report-warnings=false" };
}
foreach(var specsProj in GetFiles("./src/**/*.Specs.csproj"))
{
DotNetTest(specsProj.FullPath, new DotNetTestSettings
{
Configuration = configuration,
Loggers = loggers,
NoBuild = true,
});
}
Expand Down
1 change: 1 addition & 0 deletions src/Polly.Specs/Polly.Specs.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<ItemGroup>
<PackageReference Include="coverlet.msbuild" Version="3.2.0" PrivateAssets="all" />
<PackageReference Include="FluentAssertions" Version="6.8.0" />
<PackageReference Include="GitHubActionsTestLogger" Version="2.0.1" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.4.1" />
<PackageReference Include="Moq" Version="4.18.4" />
<PackageReference Include="ReportGenerator" Version="5.1.13" PrivateAssets="all" />
Expand Down

0 comments on commit 7a8d8f4

Please sign in to comment.