Skip to content
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
6 changes: 6 additions & 0 deletions .github/workflows/continuous.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,12 @@ jobs:
key: ${{ runner.os }}-${{ hashFiles('**/global.json', '**/*.csproj', '**/Directory.Packages.props') }}
- name: 'Run: Compile, Test, Pack'
run: ./build.cmd Compile Test Pack
- name: 'Upload test results to Codecov'
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: artifacts/test-results/*.xml
- name: 'Upload coverage to Codecov'
uses: codecov/codecov-action@v5
with:
Expand Down
4 changes: 4 additions & 0 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ class Build : NukeBuild
AbsolutePath ArtifactsDirectory => RootDirectory / "artifacts";
AbsolutePath PackagesDirectory => ArtifactsDirectory / "packages";
AbsolutePath CoverageDirectory => ArtifactsDirectory / "coverage";
AbsolutePath TestResultsDirectory => ArtifactsDirectory / "test-results";

Target Clean => _ => _
.Before(Restore)
Expand Down Expand Up @@ -107,11 +108,13 @@ class Build : NukeBuild
Target Test => _ => _
.DependsOn(Compile)
.Produces(CoverageDirectory / "*.xml")
.Produces(TestResultsDirectory / "*.xml")
.Executes(() =>
{
var projects = Solution.GetAllProjects("*.Tests");

CoverageDirectory.CreateOrCleanDirectory();
TestResultsDirectory.CreateOrCleanDirectory();

foreach (var project in projects)
{
Expand All @@ -122,6 +125,7 @@ class Build : NukeBuild
.EnableCollectCoverage()
.SetCoverletOutputFormat(CoverletOutputFormat.cobertura)
.SetCoverletOutput(CoverageDirectory / $"{project.Name}.xml")
.SetLoggers($"junit;LogFilePath={TestResultsDirectory / $"{project.Name}.xml"}")
);
}
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="JunitXml.TestLogger" Version="4.1.0">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>

<ItemGroup>
Expand Down
Loading