Browse Source

Upload TestCases folder as artifact when CI tests fail

Failed decompiler-test runs leave their generated fixtures (compiled
test assemblies, generated IL, diff inputs) on the runner where they
are lost, making CI-only failures hard to diagnose. Capture the folder
via upload-artifact's own client-side zip at compression-level 9
instead of a separate 7z step, since 7z is not reliably available on
the macOS runner.

Assisted-by: Claude:claude-fable-5:Claude Code
pull/3873/head
Christoph Wille 2 months ago
parent
commit
e1b4eb03a5
  1. 18
      .github/workflows/build-ilspy.yml

18
.github/workflows/build-ilspy.yml

@ -90,6 +90,7 @@ jobs: @@ -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: @@ -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: @@ -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: @@ -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()

Loading…
Cancel
Save