test-summary / action

Show a helpful summary of test results in GitHub Actions CI/CD workflow runs
MIT License
395 stars 32 forks source link

add `folded` option #53

Open braingram opened 3 months ago

braingram commented 3 months ago

Thanks for the useful action!

For our test runs we sometimes have several test failure with large tracebacks. It's helpful to get an overview of the failures by scanning the test names, then look into the details of the failures.

This PR adds a folded option which puts the tracebacks in a <details> block. So for a failing test the html will look something like:

<tr><td><details><summary><img...>test name</summary><br><pre><code>...

Here's a screenshot from an example test run:

Screenshot 2024-08-07 at 9 45 10 AM

and one with the first test expanded:

Screenshot 2024-08-07 at 9 45 52 AM

Please excuse any silly mistakes and any comments suggestions are greatly appreciated. It's the first few lines of typescript I've ever written.

By default the option is off but can be enabled by providing folded: true in the action configuration.

zacharyburnett commented 3 months ago

@ethomson

markfickett commented 1 month ago

I've been searching for a way to hide long tracebacks, just like this. So it would be awesome to have this merged/released!

Is there a way to reference the version from this PR? You can reference a GH action by any ref, but I tried uses: test-summary/action@briangram:folded and uses: test-summary/action@a84d6b8e57758e50ffd188c78066ab4416d8a988 with no luck.

braingram commented 1 month ago

I've been searching for a way to hide long tracebacks, just like this. So it would be awesome to have this merged/released!

Is there a way to reference the version from this PR? You can reference a GH action by any ref, but I tried uses: test-summary/action@briangram:folded and uses: test-summary/action@a84d6b8e57758e50ffd188c78066ab4416d8a988 with no luck.

Give uses: braingram/test-summary-action@dist a try. This repo uses a separate distribution branch. I cobbled together one for my fork while working on the PR. Feel free to use it for testing. I make no promises that it won't suddenly disappear (especially if this PR gets merged) so using it in "production" is "at your own risk". Let me know if you run into any issues or have questions.

markfickett commented 1 month ago

Thanks, that works great! And I'll be cautious about using the ephemeral ref. (:

image