Browse Source

.NET 10 MTP dotnet test

pull/3507/head
Christoph Wille 2 weeks ago
parent
commit
7598a43d3a
  1. 16
      .github/workflows/build-ilspy.yml
  2. 4
      Directory.Packages.props
  3. 9
      ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
  4. 7
      ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj
  5. 7
      ILSpy.Tests/ILSpy.Tests.csproj
  6. 2
      dotnet.config

16
.github/workflows/build-ilspy.yml

@ -63,24 +63,26 @@ jobs: @@ -63,24 +63,26 @@ jobs:
run: msbuild ILSpy.sln /p:Configuration=${{ matrix.configuration }} /p:Platform=$env:BuildPlatform /m
- name: Execute unit tests
run: dotnet test --logger "trx;LogFileName=${{ matrix.configuration }}.trx" --results-directory test-results $env:Tests1 $env:Tests2 $env:Tests3
env:
Tests1: ICSharpCode.Decompiler.Tests\bin\${{ matrix.configuration }}\net10.0-windows\win-x64\ICSharpCode.Decompiler.Tests.dll
Tests2: ILSpy.Tests\bin\${{ matrix.configuration }}\net10.0-windows\ILSpy.Tests.dll
Tests3: ILSpy.BamlDecompiler.Tests\bin\${{ matrix.configuration }}\net10.0-windows\win-x64\ILSpy.BamlDecompiler.Tests.dll
run: dotnet test --solution ilspy.sln --configuration Debug --no-build --report-trx --report-trx-filename test-results.trx
- name: Upload Test Logs
uses: actions/upload-artifact@v4
if: success() || failure()
with:
name: test-results-${{ matrix.configuration }}
path: 'test-results/${{ matrix.configuration }}.trx'
path: |
ICSharpCode.Decompiler.Tests/bin/${{ matrix.configuration }}/net10.0-windows/win-x64/TestResults/*.trx
ILSpy.Tests/bin/${{ matrix.configuration }}/net10.0-windows/TestResults/*.trx
ILSpy.BamlDecompiler.Tests/bin/${{ matrix.configuration }}/net10.0-windows/win-x64/TestResults/*.trx
- name: Create Test Report
uses: icsharpcode/test-summary-action@dist
if: always()
with:
paths: "test-results/${{ matrix.configuration }}.trx"
paths: |
ICSharpCode.Decompiler.Tests/bin/${{ matrix.configuration }}/net10.0-windows/win-x64/TestResults/*.trx
ILSpy.Tests/bin/${{ matrix.configuration }}/net10.0-windows/TestResults/*.trx
ILSpy.BamlDecompiler.Tests/bin/${{ matrix.configuration }}/net10.0-windows/win-x64/TestResults/*.trx
folded: true
- name: Format check

4
Directory.Packages.props

@ -11,7 +11,6 @@ @@ -11,7 +11,6 @@
<PackageVersion Include="Dirkster.AvalonDock.Themes.VS2013" Version="4.72.1" />
<PackageVersion Include="ILCompiler.Reflection.ReadyToRun.Experimental" Version="10.0.0-preview.4.25213.101" />
<PackageVersion Include="Iced" Version="1.21.0" />
<PackageVersion Include="JunitXml.TestLogger" Version="6.1.0" />
<PackageVersion Include="K4os.Compression.LZ4" Version="1.3.8" />
<PackageVersion Include="McMaster.Extensions.CommandLineUtils" Version="4.1.1" />
<PackageVersion Include="McMaster.Extensions.Hosting.CommandLine" Version="4.1.1" />
@ -29,12 +28,13 @@ @@ -29,12 +28,13 @@
<PackageVersion Include="Microsoft.NETCore.ILDAsm" Version="9.0.4" />
<PackageVersion Include="Microsoft.Sbom.Targets" Version="3.1.0" />
<PackageVersion Include="Microsoft.SourceLink.GitHub" Version="8.0.0" />
<PackageVersion Include="Microsoft.Testing.Extensions.TrxReport" Version="1.7.3" />
<PackageVersion Include="Microsoft.Xaml.Behaviors.Wpf" Version="1.1.135" />
<PackageVersion Include="Mono.Cecil" Version="0.11.6" />
<PackageVersion Include="NSubstitute" Version="5.3.0" />
<PackageVersion Include="NSubstitute.Analyzers.CSharp" Version="1.0.17" />
<PackageVersion Include="NUnit" Version="4.3.2" />
<PackageVersion Include="NUnit3TestAdapter" Version="4.6.0" />
<PackageVersion Include="NUnit3TestAdapter" Version="5.1.0-alpha.3" />
<PackageVersion Include="NuGet.Protocol" Version="6.13.2" />
<PackageVersion Include="PowerShellStandard.Library" Version="5.1.1" />
<PackageVersion Include="Shouldly" Version="4.3.0" />

9
ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

@ -13,7 +13,12 @@ @@ -13,7 +13,12 @@
<RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier>
<IsPackable>false</IsPackable>
<StartupObject>AutoGeneratedProgram</StartupObject>
<GenerateTestingPlatformEntryPoint>true</GenerateTestingPlatformEntryPoint>
<StartupObject>ICSharpCode.Decompiler.Tests.MicrosoftTestingPlatformEntryPoint</StartupObject>
<EnableNUnitRunner>true</EnableNUnitRunner>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
@ -69,7 +74,7 @@ @@ -69,7 +74,7 @@
</PackageReference>
<PackageReference Include="NUnit" />
<PackageReference Include="Shouldly" />
<PackageReference Include="JunitXml.TestLogger" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
<PackageReference Include="Microsoft.NET.Test.Sdk" />
<PackageReference Include="System.Memory" />
<PackageReference Include="Mono.Cecil" />

7
ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj

@ -12,7 +12,10 @@ @@ -12,7 +12,10 @@
<RuntimeIdentifier Condition="$(IsWindowsARM64) == true">win-arm64</RuntimeIdentifier>
<IsPackable>false</IsPackable>
<StartupObject>AutoGeneratedProgram</StartupObject>
<EnableNUnitRunner>true</EnableNUnitRunner>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<OutputType>Exe</OutputType>
<EnableDefaultItems>false</EnableDefaultItems>
<UseWpf>true</UseWpf>
@ -40,7 +43,7 @@ @@ -40,7 +43,7 @@
<PackageReference Include="NUnit" />
<PackageReference Include="NUnit3TestAdapter" />
<PackageReference Include="Shouldly" />
<PackageReference Include="JunitXml.TestLogger" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
<PackageReference Include="coverlet.collector">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

7
ILSpy.Tests/ILSpy.Tests.csproj

@ -4,7 +4,10 @@ @@ -4,7 +4,10 @@
<PropertyGroup>
<TargetFramework>net10.0-windows</TargetFramework>
<IsPackable>false</IsPackable>
<StartupObject>AutoGeneratedProgram</StartupObject>
<EnableNUnitRunner>true</EnableNUnitRunner>
<TestingPlatformDotnetTestSupport>true</TestingPlatformDotnetTestSupport>
<OutputType>Exe</OutputType>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
@ -75,7 +78,7 @@ @@ -75,7 +78,7 @@
</PackageReference>
<PackageReference Include="NUnit" />
<PackageReference Include="Shouldly" />
<PackageReference Include="JunitXml.TestLogger" />
<PackageReference Include="Microsoft.Testing.Extensions.TrxReport" />
</ItemGroup>
<ItemGroup>

2
dotnet.config

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
[dotnet.test.runner]
name = "Microsoft.Testing.Platform"
Loading…
Cancel
Save