-
Notifications
You must be signed in to change notification settings - Fork 13
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
gh-actions: Add action to install gotestfmt and our wrapper script #42
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.
Thanks for this! This will definitively be really helpful. I have no major comments on that PR, mostly stylistic to have a coherent script style, and some questions along the lines!
7353915
to
0aa426b
Compare
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.
Thanks for all those changes! They really look good.
I only have one comment remaining to avoid GH printing this set -eu
in the step, and then, we are good to go(testfmt)!
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.
Excellent! Nothing remaining on my side :)
(Note: I’m unsure that was intentional, but you didn’t +1 on the comment and reask for review, but I assumed that was just forgotten, if you didn’t want to have another look yet, sorry about it)
Right, sorry, I still forget re-requesting the review sometimes, I'm not used to that workflow. |
The output of go test is notoriously hard to read, especially when a lot of tests are executed and a lot of output is produced. gotestfmt can hide the output of successful tests and put the output of failed tests in an expandable group. This commit adds a custom GitHub Action which installs gotestfmt and a wrapper script which improves the output and copies it to log files, which can then be uploaded as test artifacts.
In the output of the GitHub Actions run, the commands run for each step are collapsed, with only the first line being shown unless it's expanded. It's not helpful if that line is "set -eu" for all our multi-command steps, so we add a comment to the fist line instead which describes what the commands are doing.
The output of
go test
is notoriously hard to read, especially when a lot of tests are executed and a lot of output is produced. gotestfmt can hide the output of successful tests and put the output of failed tests in an expandable group.This PR adds a custom GitHub Action which installs gotestfmt and a wrapper script which improves the output and copies it to log files, which can then be uploaded as test artifacts.
You can see an example of the produced output when a test fails in this job. A link to the artifacts of that job can be found in the "Upload test artifacts" step of that job.