Skip to content

[DOP-23126] added basic pytest-coverage-comment#257

Merged
marashka merged 8 commits intodevelopfrom
DOP-23126
Aug 21, 2025
Merged

[DOP-23126] added basic pytest-coverage-comment#257
marashka merged 8 commits intodevelopfrom
DOP-23126

Conversation

@marashka
Copy link
Contributor

@marashka marashka commented Aug 13, 2025

Change Summary

Related issue number

Checklist

  • Commit message and PR title is comprehensive
  • Keep the change as small as possible
  • Unit and integration tests for the changes exist
  • Tests pass on CI and coverage does not decrease
  • Documentation reflects the changes where applicable
  • docs/changelog/next_release/<pull request or issue id>.<change type>.rst file added describing change
    (see CONTRIBUTING.rst for details.)
  • My PR is ready to review.

@dolfinus
Copy link
Member

dolfinus commented Aug 14, 2025

Github Action cannot create comment in PR, probably because default token permissions are restricted to read-only:

permissions:
contents: read

We should add additional permissions to Tests done job:
https://docs.github.com/ru/actions/reference/workflows-and-actions/workflow-syntax#permissions
https://github.com/MishaKav/pytest-coverage-comment?tab=readme-ov-file#-troubleshooting

permissions:
  contents: write
  checks: write
  pull-requests: write

Also, we should pass following options to action to properly report coverage change:

with:
  default-branch: develop
  xml-skip-covered: true

And it would be nice to have a README badge showing develop branch coverage:
https://github.com/MishaKav/pytest-coverage-comment?tab=readme-ov-file#-advanced-features
Gist can be created within the organization, for token you can use ${{ secrets.AUTOMERGE_TOKEN }}.
Old Codecov badge can be removed.

@dolfinus dolfinus added the ci:skip-changelog Add this label to skip changelog file check label Aug 14, 2025
@github-actions
Copy link

github-actions bot commented Aug 14, 2025

Coverage

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

@dolfinus
Copy link
Member

Let's address the badge comment above, and remove all Codecov-related files from repo

@dolfinus
Copy link
Member

dolfinus commented Aug 20, 2025

There is also a https://github.com/MobileTeleSystems/syncmaster/blob/develop/codecov.yml left, let's remove it, and implement coverage percent check as CI job step.

@marashka marashka enabled auto-merge (squash) August 21, 2025 10:50
@marashka marashka merged commit ab91445 into develop Aug 21, 2025
24 checks passed
@marashka marashka deleted the DOP-23126 branch August 21, 2025 10:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:skip-changelog Add this label to skip changelog file check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments