Skip to content
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

Consider gotestfmt to make test output in CI more readable #74

Closed
daenney opened this issue Dec 13, 2021 · 5 comments
Closed

Consider gotestfmt to make test output in CI more readable #74

daenney opened this issue Dec 13, 2021 · 5 comments

Comments

@daenney
Copy link
Member

daenney commented Dec 13, 2021

The go test output can be overwhelming if there's a lot of tests, and it can be hard to find the actual failure. This makes it annoying when trying to find the broken test in CI.

There's a rather nice library gotestfmt that prettifies the output and makes each test a collapsible section in the GitHub Actions UI. The use of colour and emoji in the output makes it easier to spot what's broken.

How would people feel about using it? I would only integrate it in CI, so we don't affect people's local flows and preferences.

@Sean-Der
Copy link
Member

@daenney Yes please!

We also need to improve the commit message linter. It would save me so much time if it spit out a 'GitHub Actions Native' message. The users don't need to open up the action stdout.

@daenney
Copy link
Member Author

daenney commented Apr 13, 2022

Crap, I accidentally pushed 0.7.0 tag which triggered stuff all over the place (the sync run broke eventually because it got rate limited).

So, on the bright side, test output is much more useful: https://github.com/pion/dtls/runs/6004489095?check_suite_focus=true#step:6:15

But, it does seem to actually cause code coverage issues pion/dtls#44 but idk why.

@daenney
Copy link
Member Author

daenney commented Apr 21, 2022

It would save me so much time if it spit out a 'GitHub Actions Native' message.

I can look at this, but I'm having a seriously hard time Google'ing for what that would need to look like. Do you have any pointers to docs or something that explain how the output needs to be formatted? Or do we need to call some API instead?

@stv0g
Copy link
Member

stv0g commented Jan 22, 2023

@daenney Are you still up to taking this task? Or would you mind if I take over?

@stv0g
Copy link
Member

stv0g commented Jan 22, 2023

I just realized that the CI is already using gotestfmt:

-v -race 2>&1 | grep -v '^go: downloading' | tee /tmp/gotest.log | gotestfmt

I will close this issue and create a new one for the related issue regarding the commit message linter output which @Sean-Der raised.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants