SONARJAVA-6211 Upload artifacts if ruling or autoscan fails#5532
SONARJAVA-6211 Upload artifacts if ruling or autoscan fails#5532tomasz-tylenda-sonarsource merged 6 commits intomasterfrom
Conversation
611adfa to
2843571
Compare
2843571 to
fbdfcfb
Compare
SummaryAdds a reusable GitHub Action that uploads integration test artifacts and generates an HTML diff report when ruling or autoscan tests fail. This helps developers debug test failures by providing a visual side-by-side comparison of expected vs actual results without needing to run tests locally. The action is then integrated into the CI workflow for both ruling and autoscan jobs. What reviewers should knowThe core logic is in the new
|
asya-vorobeva
left a comment
There was a problem hiding this comment.
Generally looks OK. Probably makes sense to upload also artifacts for autoscan tests. Or do it in another PR.
| with: | ||
| name: actual_${{ matrix.item.runner }}_${{ matrix.item.profile }} | ||
| path: its/ruling/target/actual | ||
| retention-days: 7 |
There was a problem hiding this comment.
I think it makes sense to configure this policy on repo level.
There was a problem hiding this comment.
I don't have access to do this, but I moved the parameter to a global env in a shared action.
There was a problem hiding this comment.
Conclusion: Clean, focused CI change. The three new steps work correctly together — the artifact names are safely namespaced by runner/profile, the || true on diff correctly absorbs its non-zero exit code when differences exist, and the if: failure() conditions are appropriate throughout.
ecb01f3 to
eeaf393
Compare
a6aed3f to
f48908e
Compare
Done. I extracted a shared action (which is good idea even with one usage). |
|





To help understand the problem we upload:
Test run with intentionally broken ruling: https://github.com/SonarSource/sonar-java/actions/runs/23587514988