From 643c1aa98e0b0c94395b8fd369a81ea502e76a4c Mon Sep 17 00:00:00 2001 From: Rafael Vuijk Date: Tue, 27 Oct 2026 13:55:41 +0000 Subject: [PATCH] The Linux and macOS test legs run the suite without instrumenting it Both legs passed /p:CollectCoverage=true to dotnet test. Coverlet's MSBuild integration then instrumented the kernel and printed `AngouriMath | 0%` on every run, because VSTest stops the test host before coverlet writes its hits (the first entry of coverlet's KnownIssues.md). Nothing uploads either report: the Windows leg's collector report is the one sent to Codecov. The instrumentation was not free. On master 90ac9752a the test step took 16 m 47 s on Linux and 29 m 2 s on macOS. Locally the full suite takes 12 m 9 s instrumented and 7 m 7 s to 7 m 52 s without, so about two fifths of it went on a report of nothing. Coverage.md's table says where the C# coverage comes from. Part of https://github.com/asc-community/AngouriMath/issues/397 Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_012sonx8iAspMiwRwokT1Ura --- .github/workflows/CSharpTest.yml | 7 ++++++- Sources/AngouriMath/Docs/Contributing/Coverage.md | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CSharpTest.yml b/.github/workflows/CSharpTest.yml index deadcc3e0..0999ccdf8 100644 --- a/.github/workflows/CSharpTest.yml +++ b/.github/workflows/CSharpTest.yml @@ -43,10 +43,15 @@ jobs: dotnet add "Sources/Tests/UnitTests" package GitHubActionsTestLogger dotnet build Sources/Tests/UnitTests + # No coverage on these two legs: the Windows leg's report is the one uploaded. With coverlet's + # MSBuild integration they printed `AngouriMath | 0%` on every run, because VSTest stops the + # test host before coverlet writes its hits (coverlet's KnownIssues.md), and instrumenting + # the suite took about two fifths of its time, measured locally. + # https://github.com/asc-community/AngouriMath/issues/397 - name: Test if not to send if: ${{ matrix.os != 'windows-latest' }} run: | - dotnet test "Sources/Tests/UnitTests" -c Release -l GitHubActions -l "trx;LogFileName=results.trx" --results-directory "Sources/Tests/UnitTests/TestResults" /p:CollectCoverage=true /p:CoverletOutputFormat=opencover + dotnet test "Sources/Tests/UnitTests" -c Release -l GitHubActions -l "trx;LogFileName=results.trx" --results-directory "Sources/Tests/UnitTests/TestResults" # Where the suite's time goes, by the Area trait every test class carries, written to the # job's summary. One leg is enough to see the breakdown, and running the tool builds the diff --git a/Sources/AngouriMath/Docs/Contributing/Coverage.md b/Sources/AngouriMath/Docs/Contributing/Coverage.md index 251be67fc..4b2d4470a 100644 --- a/Sources/AngouriMath/Docs/Contributing/Coverage.md +++ b/Sources/AngouriMath/Docs/Contributing/Coverage.md @@ -6,7 +6,7 @@ round to instrumenting. | leg | workflow | what it runs | how coverage is collected | codecov flag | |---|---|---|---|---| -| C# | `CSharpTest.yml` | `dotnet test Sources/Tests/UnitTests` | coverlet, both as `/p:CollectCoverage=true` and as the VSTest `XPlat Code Coverage` collector | `csharp` | +| C# | `CSharpTest.yml` | `dotnet test Sources/Tests/UnitTests`, collected on the Windows leg | coverlet, as the VSTest `XPlat Code Coverage` collector | `csharp` | | F# | `FSharpTest.yml` | `dotnet test Sources/Tests/FSharpWrapperUnitTests` | VSTest `XPlat Code Coverage` collector | `fsharp` | | Interactive | `InteractiveTest.yml` | `dotnet test` over the Interactive wrapper and the terminal | VSTest `XPlat Code Coverage` collector | `interactive` | | C++ | `CPPTest.yml` | `ctest` over a native executable | `gcov`, reported by `gcovr` as Cobertura | `cpp` |