Skip to content

feat: Add pytest coverage comment to PRs#410

Merged
Roopan-Microsoft merged 1 commit intodevfrom
psl-add-coverage-pr-comment
Apr 20, 2026
Merged

feat: Add pytest coverage comment to PRs#410
Roopan-Microsoft merged 1 commit intodevfrom
psl-add-coverage-pr-comment

Conversation

@Rafi-Microsoft
Copy link
Copy Markdown
Contributor

Add MishaKav/pytest-coverage-comment action to post code coverage summary as a PR comment. Changes include:

  • Add pull-requests: write permission
  • Add --junitxml=pytest.xml flag for test summary
  • Add coverage comment step with per-file breakdown

Purpose

This pull request updates the GitHub Actions workflow to improve test coverage reporting on pull requests. The main changes add automated commenting of pytest coverage results directly on pull requests and adjust permissions to allow this.

Workflow enhancements for coverage reporting:

  • Added the pull-requests: write permission to the workflow to enable posting comments on pull requests.
  • Modified the backend test command to output a JUnit XML report (--junitxml=pytest.xml) for use in coverage reporting.
  • Integrated the MishaKav/pytest-coverage-comment GitHub Action to automatically post test coverage summaries as comments on pull requests, configured to only report on changed files and only for non-forked PRs.

Does this introduce a breaking change?

  • Yes
  • No

Add MishaKav/pytest-coverage-comment action to post code coverage
summary as a PR comment. Changes include:
- Add pull-requests: write permission
- Add --junitxml=pytest.xml flag for test summary
- Add coverage comment step with per-file breakdown

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions
Copy link
Copy Markdown

Coverage

Coverage Report •
FileStmtsMissCoverMissing
TOTAL222138482% 
report-only-changed-files is enabled. No files were changed during this commit :)

Tests Skipped Failures Errors Time
282 0 💤 0 ❌ 0 🔥 9.542s ⏱️

@Roopan-Microsoft Roopan-Microsoft merged commit 049b9e5 into dev Apr 20, 2026
3 checks passed
@github-actions
Copy link
Copy Markdown

🎉 This PR is included in version 1.8.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants