Skip to content

Upload TestCases folder as artifact when CI tests fail - #3874

Merged
christophwille merged 1 commit into
masterfrom
ziptestcases
Jul 10, 2026
Merged

Upload TestCases folder as artifact when CI tests fail#3874
christophwille merged 1 commit into
masterfrom
ziptestcases

Conversation

@christophwille

Copy link
Copy Markdown
Member

When tests fail in CI, the generated fixtures under ICSharpCode.Decompiler.Tests/TestCases (compiled test assemblies, generated IL, diff inputs) are lost with the runner. This uploads that folder as a maximum-compression artifact whenever the test step fails, to make CI-only failures diagnosable.

  • Windows Build job: added id: unit-tests to "Execute unit tests" and a new "Upload TestCases on test failure" step right after "Upload Test Logs", gated on failure() && steps.unit-tests.outcome == 'failure' (artifact testcases-Debug / testcases-Release)
  • Linux/macOS Desktop job: same pattern keyed to "Execute decompiler tests" via id: decompiler-tests (artifact testcases-linux / testcases-macos)
  • Uses actions/upload-artifact@v7 with compression-level: 9 instead of a separate 7z step - the action zips client-side at maximum compression, and 7z is not reliably available on the macOS runner
  • if-no-files-found stays at the default warn so a run where TestCases was never generated does not mask the original test failure with an artifact error

On green runs the new steps show as skipped; they only execute when their test step failed.

🤖 Generated with Claude Code

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
@christophwille
christophwille merged commit e1b4eb0 into master Jul 10, 2026
13 checks passed
@christophwille
christophwille deleted the ziptestcases branch July 10, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants