Github Actions:以注释形式报告 dotnet 测试结果

har*_*ded 7 .net continuous-integration .net-core dotnet-test github-actions

如果使用 Azure Pipelines 运行测试,您将在检查选项卡上获得一些很酷的结果。

在此输入图像描述

有没有什么方法可以从 Github Actions 执行相同的操作,这样我们就不必通过控制台输出?

在此输入图像描述

Hap*_*375 8

这是一种解决方案: https://github.com/microsoft/vstest/issues/2370#issuecomment-602233131

GitHub 用户 Tyrrrz 使用 GitHub Actions 命令进行了一个小型概念验证。这会将测试失败报告给 GH Actions 平台,让您可以在“注释”视图中查看它们并导航到触发它的确切/文件。这并不完全是“支持彩色输出”的解决方案,但可能会解决 GitHub Actions 无法很好地显示失败测试列表的根本问题。

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