Browse Source

Use test-summary/action@v1 for test reports.

pull/2693/head
Siegfried Pammer 3 years ago
parent
commit
1aa36a23f2
  1. 14
      .github/workflows/build-ilspy.yml
  2. 3
      ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
  3. 2
      ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj
  4. 2
      ILSpy.Tests/ILSpy.Tests.csproj
  5. 1
      packages.props

14
.github/workflows/build-ilspy.yml

@ -47,7 +47,7 @@ jobs: @@ -47,7 +47,7 @@ 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 }}-test-results.trx" $env:Tests1 $env:Tests2 $env:Tests3
run: dotnet test --logger "junit;LogFileName=${{ matrix.configuration }}.xml" --results-directory test-results $env:Tests1 $env:Tests2 $env:Tests3
env:
Tests1: ICSharpCode.Decompiler.Tests\bin\${{ matrix.configuration }}\net6.0-windows\win-x64\ICSharpCode.Decompiler.Tests.dll
Tests2: ILSpy.Tests\bin\${{ matrix.configuration }}\net6.0-windows\ILSpy.Tests.dll
@ -58,17 +58,13 @@ jobs: @@ -58,17 +58,13 @@ jobs:
if: success() || failure()
with:
name: test-results-${{ matrix.configuration }}
path: '**/*.trx'
path: 'test-results/${{ matrix.configuration }}.xml'
- name: Create Test Report
uses: phoenix-actions/test-reporting@v6
if: github.event_name != 'pull_request' && (success() || failure())
uses: test-summary/action@v1
if: always()
with:
name: Unit Test Results (${{ matrix.configuration }})
path: '**/*.trx'
reporter: dotnet-trx
list-suites: 'all'
list-tests: 'failed'
paths: "test-results/${{ matrix.configuration }}.xml"
- name: Format check
run: python BuildTools\tidy.py

3
ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

@ -54,6 +54,8 @@ @@ -54,6 +54,8 @@
<PackageReference Include="NUnit3TestAdapter" Version="$(NUnitAdapterVersion)" />
<PackageReference Include="coverlet.collector" Version="$(CoverletCollectorVersion)" />
<PackageReference Include="NUnit" Version="$(NUnitVersion)" />
<!-- used for xml test result files -->
<PackageReference Include="JunitXml.TestLogger" Version="$(JUnitXmlTestLoggerVersion)" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageReference Include="System.Memory" Version="4.5.4" />
<PackageReference Include="Mono.Cecil" Version="$(MonoCecilVersion)" />
@ -106,6 +108,7 @@ @@ -106,6 +108,7 @@
<Compile Include="Output\InsertParenthesesVisitorTests.cs" />
<Compile Include="ProjectDecompiler\TargetFrameworkTests.cs" />
<Compile Include="TestAssemblyResolver.cs" />
<None Include="TestCases\Pretty\MetadataAttributes.cs" />
<None Include="TestCases\Correctness\ComInterop.cs" />
<Compile Include="TestCases\Correctness\DeconstructionTests.cs" />
<Compile Include="TestCases\Correctness\DynamicTests.cs" />

2
ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj

@ -33,6 +33,8 @@ @@ -33,6 +33,8 @@
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="$(MicrosoftNETTestSdkVersion)" />
<PackageReference Include="NUnit" Version="$(NUnitVersion)" />
<PackageReference Include="NUnit3TestAdapter" Version="$(NUnitAdapterVersion)" />
<!-- used for xml test result files -->
<PackageReference Include="JunitXml.TestLogger" Version="$(JUnitXmlTestLoggerVersion)" />
<PackageReference Include="coverlet.collector" Version="$(CoverletCollectorVersion)" />
</ItemGroup>

2
ILSpy.Tests/ILSpy.Tests.csproj

@ -52,6 +52,8 @@ @@ -52,6 +52,8 @@
<PackageReference Include="NUnit3TestAdapter" Version="$(NUnitAdapterVersion)" />
<PackageReference Include="coverlet.collector" Version="$(CoverletCollectorVersion)" />
<PackageReference Include="NUnit" Version="$(NUnitVersion)" />
<!-- used for xml test result files -->
<PackageReference Include="JunitXml.TestLogger" Version="$(JUnitXmlTestLoggerVersion)" />
<PackageReference Include="Moq" Version="$(MoqVersion)" />
</ItemGroup>

1
packages.props

@ -20,6 +20,7 @@ @@ -20,6 +20,7 @@
<WpfStylesToolboxVersion>2.7.4</WpfStylesToolboxVersion>
<NUnitVersion>3.13.3</NUnitVersion>
<NUnitAdapterVersion>4.2.1</NUnitAdapterVersion>
<JUnitXmlTestLoggerVersion>3.0.110</JUnitXmlTestLoggerVersion>
<CoverletCollectorVersion>3.1.2</CoverletCollectorVersion>
<MicrosoftNETTestSdkVersion>17.0.0</MicrosoftNETTestSdkVersion>
<MoqVersion>4.16.1</MoqVersion>

Loading…
Cancel
Save