Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use GitHub Actions Job Summary #99

Merged
merged 1 commit into from
Aug 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,6 @@ jobs:
with:
name: coverage
path: ./artifacts/coverage-report
- name: Report test results
uses: dorny/test-reporter@v1.6.0
continue-on-error: true
if: ${{ always() }}
with:
name: Test results
path: 'artifacts/test-results/**/*.trx'
reporter: dotnet-trx
- name: Determine if we're skipping release on feature Pull Request
if: ${{ env.IS_FEATURE_PULL_REQUEST == 'true' }}
run: |
Expand Down
4 changes: 2 additions & 2 deletions .nuke/build.schema.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Build Schema",
"$ref": "#/definitions/build",
"title": "Build Schema",
"definitions": {
"build": {
"type": "object",
Expand Down Expand Up @@ -121,4 +121,4 @@
}
}
}
}
}
1 change: 1 addition & 0 deletions Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="1.1.1" />
<PackageVersion Include="coverlet.collector" Version="6.0.0" />
<PackageVersion Include="FluentAssertions" Version="6.12.0" />
<PackageVersion Include="GitHubActionsTestLogger" Version="2.3.3" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="17.7.1" />
<PackageVersion Include="xunit" Version="2.5.0" />
<PackageVersion Include="xunit.runner.visualstudio" Version="2.4.3" Condition="'$(TargetFramework)' == 'netcoreapp3.1'" />
Expand Down
14 changes: 13 additions & 1 deletion build/Build.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Nuke.Common;
using Nuke.Common.CI;
Expand Down Expand Up @@ -111,11 +112,22 @@ from framework in testProject.GetTargetFrameworks()
var testResultsName = $"{p.TestProject.Path.NameWithoutExtension}-{p.Framework}";
var testResultsDirectory = TestResultsDirectory / testResultsName;

var loggers = new List<string>
{
$"trx;LogFileName={testResultsName}.trx",
$"html;LogFileName={testResultsName}.html"
};

if (IsServerBuild)
{
loggers.Add($"GitHubActions;annotations.titleFormat=$test ({p.Framework})");
}

return ss
.SetProjectFile(p.TestProject)
.SetFramework(p.Framework)
.SetResultsDirectory(testResultsDirectory)
.SetLoggers($"trx;LogFileName={testResultsName}.trx", $"html;LogFileName={testResultsName}.html");
.SetLoggers(loggers);
}), completeOnFailure: true);
});

Expand Down
4 changes: 4 additions & 0 deletions tests/XsltTests/XsltTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" />
<PackageReference Include="GitHubActionsTestLogger">
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="xunit" />
<PackageReference Include="xunit.runner.visualstudio">
Expand Down