diff --git a/.github/workflows/build-ilspy.yml b/.github/workflows/build-ilspy.yml index 8c0857899..1134460a0 100644 --- a/.github/workflows/build-ilspy.yml +++ b/.github/workflows/build-ilspy.yml @@ -90,6 +90,7 @@ jobs: run: dotnet-format whitespace --verify-no-changes --verbosity detailed ILSpy.sln - name: Execute unit tests + id: unit-tests run: > dotnet test --solution ilspy.sln --configuration ${{ matrix.configuration }} @@ -103,6 +104,14 @@ jobs: name: test-results-${{ matrix.configuration }} path: 'test-results/${{ matrix.configuration }}/*.trx' + - name: Upload TestCases on test failure + uses: actions/upload-artifact@v7 + if: failure() && steps.unit-tests.outcome == 'failure' + with: + name: testcases-${{ matrix.configuration }} + path: ICSharpCode.Decompiler.Tests/TestCases + compression-level: 9 + - name: Create Test Report uses: test-summary/action@v2 if: always() @@ -324,6 +333,7 @@ jobs: --results-directory test-results - name: Execute decompiler tests + id: decompiler-tests run: > dotnet test --project ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj --configuration Release @@ -337,6 +347,14 @@ jobs: name: test-results-${{ matrix.platform }} path: 'test-results/*.trx' + - name: Upload TestCases on test failure + uses: actions/upload-artifact@v7 + if: failure() && steps.decompiler-tests.outcome == 'failure' + with: + name: testcases-${{ matrix.platform }} + path: ICSharpCode.Decompiler.Tests/TestCases + compression-level: 9 + - name: Create Test Report uses: test-summary/action@v2 if: always()