diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index c684ff8c0..03bc37cc4 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -63,24 +63,20 @@ 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 ${{ matrix.configuration }} --no-build --report-trx --results-directory test-results/${{ matrix.configuration }} - 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: 'test-results/${{ matrix.configuration }}/*.trx' - name: Create Test Report uses: icsharpcode/test-summary-action@dist if: always() with: - paths: "test-results/${{ matrix.configuration }}.trx" + paths: "test-results/${{ matrix.configuration }}/*.trx" folded: true - name: Format check diff --git a/.gitignore b/.gitignore index e871f125d..841c2dcc8 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,5 @@ ILSpy.Installer/wix/ /VERSION /ICSharpCode.Decompiler/Properties/DecompilerVersionInfo.cs */.vscode/ -DecompilerTests.config.json \ No newline at end of file +DecompilerTests.config.json +*.trx \ No newline at end of file diff --git a/Directory.Build.props b/Directory.Build.props index 8281d7abd..8f2175855 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -2,4 +2,8 @@ IDE2000 + + + true + \ No newline at end of file diff --git a/Directory.Packages.props b/Directory.Packages.props index 37ef9ac32..583f84e85 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -11,7 +11,6 @@ - @@ -29,12 +28,13 @@ + - + diff --git a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj index 50bc5be58..97dfc1c44 100644 --- a/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj +++ b/ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj @@ -13,7 +13,10 @@ win-arm64 false - AutoGeneratedProgram + + true + ICSharpCode.Decompiler.Tests.MicrosoftTestingPlatformEntryPoint + Exe True @@ -69,7 +72,7 @@ - + diff --git a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj index 3c758f5ae..a83191339 100644 --- a/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj +++ b/ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj @@ -12,7 +12,7 @@ win-arm64 false - AutoGeneratedProgram + Exe false true @@ -40,7 +40,7 @@ - + all runtime; build; native; contentfiles; analyzers; buildtransitive diff --git a/ILSpy.Tests/ILSpy.Tests.csproj b/ILSpy.Tests/ILSpy.Tests.csproj index 5c361e11c..cad59a4a8 100644 --- a/ILSpy.Tests/ILSpy.Tests.csproj +++ b/ILSpy.Tests/ILSpy.Tests.csproj @@ -1,10 +1,17 @@  + + true + true + + net10.0-windows false - AutoGeneratedProgram + win-x64 + win-arm64 + Exe True @@ -75,7 +82,7 @@ - + diff --git a/dotnet.config b/dotnet.config new file mode 100644 index 000000000..b87edde3a --- /dev/null +++ b/dotnet.config @@ -0,0 +1,2 @@ +[dotnet.test.runner] +name = "Microsoft.Testing.Platform" \ No newline at end of file