From 43e266600512b09cab7a4c8209f8d1958facbbfb Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 16 Jan 2026 14:30:47 +0000
Subject: [PATCH 1/2] Initial plan
From ade0d25d4e87337cac42a214d04ec4ee4e2ba12f Mon Sep 17 00:00:00 2001
From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com>
Date: Fri, 16 Jan 2026 14:35:59 +0000
Subject: [PATCH 2/2] Add Codecov Test Analytics support
Co-authored-by: ScarletKuro <19953225+ScarletKuro@users.noreply.github.com>
---
.github/workflows/continuous.yml | 6 ++++++
build/Build.cs | 4 ++++
.../Scarlet.System.Text.Json.DateTimeConverter.Tests.csproj | 4 ++++
3 files changed, 14 insertions(+)
diff --git a/.github/workflows/continuous.yml b/.github/workflows/continuous.yml
index 6eac7bd..f188a09 100644
--- a/.github/workflows/continuous.yml
+++ b/.github/workflows/continuous.yml
@@ -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:
diff --git a/build/Build.cs b/build/Build.cs
index 67834ed..5dda2c5 100644
--- a/build/Build.cs
+++ b/build/Build.cs
@@ -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)
@@ -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)
{
@@ -122,6 +125,7 @@ class Build : NukeBuild
.EnableCollectCoverage()
.SetCoverletOutputFormat(CoverletOutputFormat.cobertura)
.SetCoverletOutput(CoverageDirectory / $"{project.Name}.xml")
+ .SetLoggers($"junit;LogFilePath={TestResultsDirectory / $"{project.Name}.xml"}")
);
}
});
diff --git a/src/Scarlet.System.Text.Json.DateTimeConverter.Tests/Scarlet.System.Text.Json.DateTimeConverter.Tests.csproj b/src/Scarlet.System.Text.Json.DateTimeConverter.Tests/Scarlet.System.Text.Json.DateTimeConverter.Tests.csproj
index 6fd67cd..1f781fa 100644
--- a/src/Scarlet.System.Text.Json.DateTimeConverter.Tests/Scarlet.System.Text.Json.DateTimeConverter.Tests.csproj
+++ b/src/Scarlet.System.Text.Json.DateTimeConverter.Tests/Scarlet.System.Text.Json.DateTimeConverter.Tests.csproj
@@ -24,6 +24,10 @@
all
runtime; build; native; contentfiles; analyzers; buildtransitive
+
+ all
+ runtime; build; native; contentfiles; analyzers; buildtransitive
+