-
Notifications
You must be signed in to change notification settings - Fork 11
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
Coverage report in readme #32
Conversation
I am not sure we even need setup-python since we are using poetry for packaging. You can confirm that and remove it if not require. |
Nevermind. It is in github actions. I thought we had that in as a requirement. |
We do because you need to have python installed for poetry to run xd |
name: Generate coverage comment | ||
id: coverage_comment | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to create this token?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. The action will create a separate branch where it'll store the badge svg and the html report, and it needs that token to do so. Rest assured, the version for the action is set explicitly and the action is ran entirely on github, no docker containers or anything, so your token is safe :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the action runs, check the new branch and just copy the markdown code for badge from the readme :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After the action runs, check the new branch and just copy the markdown code for badge from the readme :)
Is it a onetime thing or do we have to do it everytime the coverage changes?
Closes #30
Changes
Changed the ci workflow to use the py-cov-action/python-coverage-comment-action to create a coverage badge and report to display in the readme.
To do this, I also had to add a
.coveragerc
file to store a configuration option for pytest-cov.Also I took the liberty to upgrade
actions/setup-python
from version 3 to version 5 :)