-
Notifications
You must be signed in to change notification settings - Fork 369
Adding code coverage to tests in workflow #75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adding code coverage to tests in workflow #75
Conversation
This is using the pattern from the Aspire Community Toolkit which will publish coverage results to the GitHub Actions summary, as well as a comment on the PR (if the job was run by someone with permissions to write comments). Also added the GitHubActionsTestLogger so that it writes a nicer log out to the run. Fixes modelcontextprotocol#11
I'm unsure why the test failed, but it printed coverage results! https://github.com/modelcontextprotocol/csharp-sdk/actions/runs/14026518268#summary-39266074135 |
Maybe I'm missing something, but I couldn't find a code coverage report in the test results. |
Code coverage is generated from the new I also included the test output summaries (and incorrectly called it coverage above 🤣) as that's useful to see. |
Hmm, I'll have to check why those files aren't included |
Turns out that I'd forgotten to include a dependency on I really should document the workflow/steps properly rather than trying to do this from memory each time... |
Tada! 🎉 CI jobs triggered by contributors should also get a comment on the PR of coverage. |
@stephentoub is this ready to merge or are you planning to push more changes? |
Fixes #11
Motivation and Context
This is using the pattern from the Aspire Community Toolkit which will publish coverage results to the GitHub Actions summary, as well as a comment on the PR (if the job was run by someone with permissions to write comments).
Also added the GitHubActionsTestLogger so that it writes a nicer log out to the run.
How Has This Been Tested?
Yes
Breaking Changes
No
Types of changes
Checklist
Additional context