TheAngryByrd / MiniScaffold

F# Template for creating and publishing libraries targeting .NET 6.0 `net6.0` or console apps .NET 6.0 `net6.0`.
https://www.jimmybyrd.me/MiniScaffold/
MIT License
267 stars 31 forks source link

Use test-reporter in GitHub actions to display test results. #255

Open TheAngryByrd opened 2 years ago

TheAngryByrd commented 2 years ago

Is your feature request related to a problem? Please describe.

Incorporate https://github.com/dorny/test-reporter to display test results

Describe the solution you'd like A clear and concise description of what you want to happen.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context

dotnet test --logger:"trx;LogFilePrefix=testResults" LogFilePrefix will make sure to specify the TFM in the results output so you get something like testResults_net6.0_20220406080049.trx instead of messages like WARNING: Overwriting results file: TestResults/test-results.trx for every TargetFramework

Could also try using fsproj/props properties

<PropertyGroup>
  <VSTestLogger>trx</VSTestLogger>
  <VSTestLogFilePrefix>testResults</VSTestLogFilePrefix>
</PropertyGroup>

Twitter Discussion

Example Output

TheAngryByrd commented 2 years ago

This also looks like an option https://github.com/Tyrrrz/GitHubActionsTestLogger but requires a feature of GitHub Actions that is in closed preview