Skip to content

Commit

Permalink
Use test-summary/action@v1 for test reports.
Browse files Browse the repository at this point in the history
  • Loading branch information
siegfriedpammer committed May 10, 2022
1 parent e61f46c commit 1aa36a2
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/build-ilspy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)" />
Expand Down Expand Up @@ -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" />
Expand Down
2 changes: 2 additions & 0 deletions ILSpy.BamlDecompiler.Tests/ILSpy.BamlDecompiler.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
2 changes: 2 additions & 0 deletions ILSpy.Tests/ILSpy.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>

Expand Down
1 change: 1 addition & 0 deletions packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 1aa36a2

Please sign in to comment.