Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 1, 2025

  • Add test-reporter action to template workflows (Library and Console)
  • Update template build scripts to generate TRX test results with proper naming
  • Add test-reporter action to main repository workflow
  • Update main repository build script to generate TRX test results
  • Fix integration test arguments to use Expecto RunSettings format
  • Remove invalid Expecto.summary=true argument
  • Fix argument passing to split -- and parameters as separate arguments
  • Add console logger with detailed verbosity for CI output visibility
Original prompt

This section details on the original issue you should resolve

<issue_title>Use test-reporter in GitHub actions to display test results.</issue_title>
<issue_description>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
</issue_description>

Comments on the Issue (you are @copilot in this section)

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

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI changed the title [WIP] Add test-reporter to display test results in GitHub actions Add test-reporter action to display test results in GitHub Actions Nov 1, 2025
Copilot AI requested a review from TheAngryByrd November 1, 2025 12:10
Copilot finished work on behalf of TheAngryByrd November 1, 2025 12:10
@TheAngryByrd
Copy link
Owner

Copy link
Contributor Author

Copilot AI commented Nov 1, 2025

@copilot add this to the main project as well

Added test-reporter integration to the main project in commit dedef80:

  1. Updated .github/workflows/build.yml to include the test-reporter step
  2. Modified build/build.fs to switch from dotnet run to DotNet.test with TRX logger (Logger = Some "trx;LogFilePrefix=testResults")
  3. Test runner arguments (--summary and --fail-on-focused-tests) are now passed using the -- <args> syntax

The TRX files are generated with the naming pattern testResults_{tfm}_{timestamp}.trx to avoid file overwriting when testing multiple target frameworks.

Copilot finished work on behalf of TheAngryByrd November 1, 2025 12:31
@TheAngryByrd
Copy link
Owner

@copilot build is failing. you need to use Expecto.fail-on-focused-tests=true instead see https://github.com/YoloDev/YoloDev.Expecto.TestSdk?tab=readme-ov-file#runsettings-example

Copy link
Contributor Author

Copilot AI commented Nov 1, 2025

@copilot build is failing. you need to use Expecto.fail-on-focused-tests=true instead see https://github.com/YoloDev/YoloDev.Expecto.TestSdk?tab=readme-ov-file#runsettings-example

Fixed in commit 36d390f. Changed the test runner arguments to use the Expecto RunSettings format:

  • Expecto.summary=true instead of --summary
  • Expecto.fail-on-focused-tests=true instead of --fail-on-focused-tests

Each argument is now passed as a separate -- <key>=<value> parameter as required by YoloDev.Expecto.TestSdk.

Copilot finished work on behalf of TheAngryByrd November 1, 2025 12:45
@TheAngryByrd
Copy link
Owner

@copilot Expecto.summary=true is invalid, remove it.

Copy link
Contributor Author

Copilot AI commented Nov 1, 2025

@copilot Expecto.summary=true is invalid, remove it.

Removed in commit 614c010. The Expecto.summary=true argument has been removed, leaving only the Expecto.fail-on-focused-tests=true setting when running in CI.

Copilot finished work on behalf of TheAngryByrd November 1, 2025 12:54
@TheAngryByrd
Copy link
Owner

@copilot build still failing

Copy link
Contributor Author

Copilot AI commented Nov 1, 2025

@copilot build still failing

Fixed in commit 7821bae. The issue was that the -- separator and the parameter were being combined into a single quoted string "-- Expecto.fail-on-focused-tests=true", which MSBuild couldn't parse. Now they're passed as separate arguments: ["--"; "Expecto.fail-on-focused-tests=true"].

Copilot finished work on behalf of TheAngryByrd November 1, 2025 13:09
@TheAngryByrd
Copy link
Owner

@copilot add console;verbosity=detailed to the Logger parameter of the main build so we still get output during the CI process.

Copy link
Contributor Author

Copilot AI commented Nov 1, 2025

@copilot add console;verbosity=detailed to the Logger parameter of the main build so we still get output during the CI process.

Added in commit 7b59128. The console logger with detailed verbosity is now set as the primary logger, while the TRX logger is added via additional arguments. This ensures CI gets detailed console output while still generating TRX files for the test-reporter action.

Copilot finished work on behalf of TheAngryByrd November 1, 2025 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

2 participants