-
Notifications
You must be signed in to change notification settings - Fork 25
Add feature to generate JUnit XML output #720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Morriar I think I've responded to all of your feedback; I usually leave clicking "Resolve" for the reviewer so they can confirm the change first; let me know if you have a different preference. |
@Morriar Would you be able to trigger workflows and re-review? |
22ea5fd
to
167def1
Compare
@Morriar I think all of your feedback is resolved now, and I've rebased on main. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tests are failing because we're missing the type signatures.
@Morriar Pushed up final changes (weird double commit since I used the Github review "commit suggestions" feature for the first bit, and then had to manually push up another bit separately). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good, thanks!
Some style issues I'll fix in a minute:
|
Head branch was pushed to by a user without write access
@Morriar I think you'll have to approve the workflow again for the Rubocop fixes. |
Head branch was pushed to by a user without write access
@Morriar I fixed the generated RBI files now (it's unfortunate that CI doesn't run all the checks but only proceeds if the previous step completes 😞). |
For some reason CI is not triggering, can you try rebasing on |
This is particularly useful when integrating Sorbet into CI builds running on Jenkins so that Jenkins can display the output as specific failures.
Background
It's common to use the JUnit plugin on Jenkins to consume machine-readable output about the tests in your CI builds. For example, on our Ruby app tests we use the rspec_junit_formatter to output results from RSpec in a format that Jenkins can consume.
What
This PR adds JUnit style XML output as an option to Spoom so that running Sorbet in CI on Jenkins can output error information that can be displayed natively by Jenkins (and then, in turn, passed along to e.g. Github's interface).
With these changes Sorbet failures on a build look like this:
and a clean Sorbet build looks like this:
TODO
I'm happy to add docs for this feature as well, but I wanted to get initial review of the feature going sooner rather than later.