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

ci: Add test output formatter #264

Merged
merged 2 commits into from
Jun 4, 2024
Merged

ci: Add test output formatter #264

merged 2 commits into from
Jun 4, 2024

Conversation

cpuguy83
Copy link
Member

@cpuguy83 cpuguy83 commented May 23, 2024

Add a test2json formatter for better output on github actions.
This will:

  1. Group all test output per each individual test, which are collapsed per each test in the job console output.
  2. Add indicator in test group name to highlight failed tests in the console.
  3. Adds annotations for failed tests, with notices for the fail line in the file diff and also in the workflow summary.

Orignally started with gotestfmt which is pretty nice, but it doesn't support outputting annotations which is really the main thing I wanted.

More easily see failures in GHA console

image

Includes annotations in the github summary

image

Failed test output include in file diff

image

(Parallel) test output grouped by test

image

@cpuguy83 cpuguy83 force-pushed the gotestfmt branch 10 times, most recently from 84d302d to e2f17a1 Compare May 29, 2024 00:10
This will:

1. Group all test output per each individual test, which are collapsed
   per each test in the job console output.
2. Add indicator in test group name to highlight failed tests in the
   console.
3. Adds annotations for failed tests, with notices for the fail line in
   the file diff and also in the workflow summary.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
This just keeps the module download output out of the `go test` output
to keep the CI view a little cleaner.

Signed-off-by: Brian Goff <cpuguy83@gmail.com>
@cpuguy83 cpuguy83 changed the title Use gotestfmt for better test foramtting in CI ci: Add test output formatter May 29, 2024
@cpuguy83 cpuguy83 marked this pull request as ready for review May 29, 2024 00:21
@cpuguy83 cpuguy83 requested a review from a team as a code owner May 29, 2024 00:21
@cpuguy83 cpuguy83 merged commit e944694 into Azure:main Jun 4, 2024
9 checks passed
@cpuguy83 cpuguy83 deleted the gotestfmt branch June 4, 2024 19:09
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

Successfully merging this pull request may close these issues.

2 participants