Add support for markdown output (useful for GitHub Actions summaries)
Closed this issue ยท 0 comments
mfridman commented
GitHub recently added the ability to "supercharge" GitHub Actions with job summaries.
https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/
Let's add an output flag to allow modifying the output from the default basic output, to the markdown equivalent.
I added some crude code to see what that could look like, and I quite like it. There is some potential here to add some Go-specific summary with text information.
Things that could be improved.
- Add ability to sort the summary table, either by package name or by elapsed time (ASC and DESC)
- In a separate section of the markdown consider adding collapsable sections to expose the individual tests for that package, sortable by test name or by elapsed time
Example:
+---------+---------+------------------------------------------------+---------+
| STATUS | ELAPSED | TEST | PACKAGE |
+---------+---------+------------------------------------------------+---------+
| ๐ข PASS | 0.57 | TestCompareStrings | strings |
| ๐ข PASS | 0.12 | TestCaseConsistency | strings |
| ๐ข PASS | 0.00 | TestBuilder | strings |
| ๐ข PASS | 0.00 | TestBuilderGrow | strings |
| ๐ข PASS | 0.00 | TestBuilderWrite2 | strings |
| ๐ข PASS | 0.00 | TestBuilderWrite2/Write | strings |
| ๐ข PASS | 0.00 | TestBuilderWrite2/WriteRune | strings |
| ๐ข PASS | 0.00 | TestBuilderWrite2/WriteRuneWide | strings |
...