From b4d3e787210aaafaf8cb07b1283eb786d1ba9632 Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 1 Sep 2026 15:33:55 +0200 Subject: [PATCH 1/2] Run the test suite through Microsoft Testing Platform dotnet test on the .NET 10 SDK supports MTP natively when global.json names the runner, which retires the VSTest stack: Microsoft.NET.Test.Sdk goes away, NUnit3TestAdapter 6.x itself is the runner, and the test project becomes an executable. The recipe follows ILSpy's settled migration, including what it discarded along the way: dotnet.config (superseded by the global.json test section) and TestingPlatformDotnetTestSupport (obsolete). ILSpy's explicit VSTestBridge reference was not needed here - the build is clean without it. TRX reporting comes from Microsoft.Testing.Extensions.TrxReport, so a CI failure survives the run: the workflow writes test-results/ and uploads it even when tests fail. Coverage (coverlet.MTP) is left out - nothing collects coverage today. global.json deliberately has no sdk section: the repo has never pinned an SDK version and CI selects 10.0.x on its own; pinning should not start as a side effect of naming the test runner. Assisted-by: Claude:claude-fable-5:Claude Code --- .github/workflows/build.yml | 9 ++++++++- CLAUDE.md | 7 ++++++- Directory.Packages.props | 2 +- global.json | 5 +++++ tests/Stampeded.Core.Tests/Stampeded.Core.Tests.csproj | 4 +++- 5 files changed, 23 insertions(+), 4 deletions(-) create mode 100644 global.json diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index fb1befa..3cb458c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,7 +29,14 @@ jobs: dotnet-version: 10.0.x - run: dotnet build Stampeded.slnx -c Release - - run: dotnet test Stampeded.slnx -c Release --no-build + - run: dotnet test --solution Stampeded.slnx -c Release --no-build --report-trx --results-directory test-results + + - uses: actions/upload-artifact@v7 + if: success() || failure() + with: + name: test-results-${{ matrix.rid }} + path: test-results/*.trx + if-no-files-found: error # Framework-dependent on purpose: the app needs an installed .NET SDK at runtime # anyway (Roslyn's MSBuild workspace, dotnet build/test), so bundling a runtime diff --git a/CLAUDE.md b/CLAUDE.md index 4a9e87a..ec79fea 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -161,7 +161,12 @@ than with a tree at the wrong lines. A parser in this process answers before it Prefix `dotnet` with `OPENSSL_ENABLE_SHA1_SIGNATURES=1` (the local OpenSSL setup needs it): OPENSSL_ENABLE_SHA1_SIGNATURES=1 dotnet build Stampeded.slnx - OPENSSL_ENABLE_SHA1_SIGNATURES=1 dotnet test Stampeded.slnx + OPENSSL_ENABLE_SHA1_SIGNATURES=1 dotnet test --solution Stampeded.slnx --report-trx --results-directory test-results + +`dotnet test` runs through Microsoft.Testing.Platform (`global.json` pins the runner), so the +solution is named with `--solution` - the bare positional form is VSTest syntax and errors. +`--report-trx` leaves a TRX per test assembly under `test-results/`, which is how a failure +survives the run. Tests that exercise git create real repositories in temp directories and shell out to `git` - that is deliberate: the interesting behaviour is git's, and a mock would only assert what we diff --git a/Directory.Packages.props b/Directory.Packages.props index 7320afd..1fd816d 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -27,6 +27,6 @@ - + diff --git a/global.json b/global.json new file mode 100644 index 0000000..3140116 --- /dev/null +++ b/global.json @@ -0,0 +1,5 @@ +{ + "test": { + "runner": "Microsoft.Testing.Platform" + } +} diff --git a/tests/Stampeded.Core.Tests/Stampeded.Core.Tests.csproj b/tests/Stampeded.Core.Tests/Stampeded.Core.Tests.csproj index d87dc07..034de14 100644 --- a/tests/Stampeded.Core.Tests/Stampeded.Core.Tests.csproj +++ b/tests/Stampeded.Core.Tests/Stampeded.Core.Tests.csproj @@ -1,11 +1,13 @@ false + Exe + true - + From 148fea9ab5d4b538ff14a9255a03a1b724cf967e Mon Sep 17 00:00:00 2001 From: Christoph Wille Date: Tue, 1 Sep 2026 15:34:49 +0200 Subject: [PATCH 2/2] Render the TRX results into the workflow run summary The uploaded artifact answers a deep investigation; the summary page answers the first question - what failed - without downloading anything. Same test-summary/action@v2 arrangement ILSpy uses, folded so a green run stays one line. Assisted-by: Claude:claude-fable-5:Claude Code --- .github/workflows/build.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3cb458c..5e6f7ab 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -38,6 +38,13 @@ jobs: path: test-results/*.trx if-no-files-found: error + - name: Create Test Report + uses: test-summary/action@v2 + if: always() + with: + paths: test-results/*.trx + folded: true + # Framework-dependent on purpose: the app needs an installed .NET SDK at runtime # anyway (Roslyn's MSBuild workspace, dotnet build/test), so bundling a runtime # would only grow the artifact. RID-specific so an apphost exists to launch.