Tooling: Integrating JUnit Test Results Into GitHub Actions / PRs

Easily Integrate EnricoMi/publish-unit-test-result-action into your GitHub Actions with either standard or custom runners

--

An airplane’s black box with a digital display on one side showing alien symbols
Image by Midjourney

PyTest? Golang tests? We have both, and reviewing test results on a bad run has been a bit of a chore. Someone suggested that we could do better, so I did a bit of digging and came upon a great solution: if you can produce JUnit test results, you can integrate them directly into your GitHub PRs and Action runs when the latter are configured with EnricoMi’s
publish-unit-test-result-action
!

In our case, we have a mix of test steps running on GitHub’s standard runners (ubuntu-latest), as well as our own custom runners, but after a little tweaking we were able to produce really nice results.

Step 1. Make sure your test results are formatted for JUnit

PyTest makes this easy, all you have to do is pass the following argument to your pytest

--

--

Adam Fisher / fisher king (@therightstuff)

Software developer and writer of words, currently producing a graphic novel adaptation of Shakespeare's Sonnets! See http://therightstuff.bio.link for details.