Drieam / rspec-github

Formatter for RSpec to show errors in GitHub action annotations
https://drieam.github.io/rspec-github/
MIT License
61 stars 10 forks source link

Hide the process exit code line #14

Closed RobertAudi closed 1 year ago

RobertAudi commented 2 years ago

When some tests fail one of the failure is Process completed with exit code 1.. There is an example in a failed run in this repo.

CleanShot 2022-03-06 at 15 29 16@2x

Is it possible to hide this line from the annotations?

StefSchenkelaars commented 2 years ago

@RobertAudi I haven't tested it but I assume that if you change the exit code to pass, that the GitHub actions mark the full action as passed.

And next to this, the exid code is not defined by this formatter but rather the command itself. If you want your command to succeed, you can allways append || true to your command. So for example:

bundle exec rspec || true

Hope this helps. And feel free to update the README with this information 👍

RobertAudi commented 2 years ago

@StefSchenkelaars I just tried your suggestion and added || true to the commands.

You are correct that if the exit code it changed to pass then the GitHub action marks the full action as passed, so added || true will not only hide the exit code but also all the failures 😕

Il will try to investigate a bit more but as of now I don't think there is a solution to the problem.