6

If you run tests using Azure Pipelines you would get some cool results on the checks tabs.

enter image description here

Is there any way to do the same from Github Actions so we don't have to go through the console output?

enter image description here

hardkoded
  • 18,915
  • 3
  • 52
  • 64

2 Answers2

8

Here is one solution: https://github.com/microsoft/vstest/issues/2370#issuecomment-602233131

GitHub user Tyrrrz made a small proof of concept using GitHub Actions commands. This reports test failures to the GH Actions platform, letting you see them in the Annotations view and navigate to the exact/file that triggered it. This is not exactly the solution to "support colorized output" but may solve the underlying issue that GitHub Actions doesn't show the list of failed tests nicely.

https://github.com/Tyrrrz/GitHubActionsTestLogger https://github.com/Tyrrrz/GitHubActionsTestLogger/runs/525594126?check_suite_focus=true

Happypig375
  • 1,022
  • 1
  • 12
  • 32
3

You can use the Test Reporter action which provides a nice test report summary.

It supports many languages / frameworks:

.NET / xUnit / NUnit / MSTest
Dart / test
Flutter / test
Java / JUnit
JavaScript / JEST / Mocha

Here's what a report looks like (screenshot from the Test Reporter project): Test results sample

0xced
  • 25,219
  • 10
  • 103
  • 255