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
16 changes: 15 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,21 @@ 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

- 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
Expand Down
7 changes: 6 additions & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="5.9.0" />
<PackageVersion Include="NUnit" Version="4.6.1" />
<PackageVersion Include="NUnit3TestAdapter" Version="6.3.0" />
<PackageVersion Include="Microsoft.NET.Test.Sdk" Version="18.9.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="2.3.3" />
</ItemGroup>
</Project>
5 changes: 5 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"test": {
"runner": "Microsoft.Testing.Platform"
}
}
4 changes: 3 additions & 1 deletion tests/Stampeded.Core.Tests/Stampeded.Core.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<IsPackable>false</IsPackable>
<OutputType>Exe</OutputType>
<EnableNUnitRunner>true</EnableNUnitRunner>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Stampeded.Core\Stampeded.Core.csproj" />
Expand Down