Skip to content
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

Set up codecov workflow and badges #301

Merged
merged 9 commits into from
Oct 1, 2024
Merged

Set up codecov workflow and badges #301

merged 9 commits into from
Oct 1, 2024

Conversation

tsmbland
Copy link
Member

@tsmbland tsmbland commented Oct 1, 2024

Description

Adds a step to the CI workflow to upload the coverage report to codecov, and link this page from the documentation.

NOTE: the workflow is currently failing, but we believe it will only work once it has been merged to main

This replaces a half-implemented workflow using the mkdocs-coverage package which would be considerably more effort to set up properly. I also needed to change the coverage report from html to xml to get it working with codecov.

Also adds badges for codecov and PyPI to the readme

Fixes #287

Type of change

  • Documentation (non-breaking change that adds or improves the documentation)
  • New feature (non-breaking change which adds functionality)
  • Optimization (non-breaking, back-end change that speeds up the code)
  • Bug fix (non-breaking change which fixes an issue)
  • Breaking change (whatever its nature)

Key checklist

  • All tests pass (eg. python -m pytest)
  • The documentation builds and looks OK (eg. python -m sphinx -b html docs docs/build)
  • Pre-commit hooks run successfully (eg. pre-commit run --all-files)

Further checks

  • Code is commented, particularly in hard-to-understand areas
  • Tests added or an issue has been opened to tackle that in the future. (Indicate issue here: # (issue))

@tsmbland
Copy link
Member Author

tsmbland commented Oct 1, 2024

@dalonsoa Please could you generate a codecov token and add to the repository secrets?

@dalonsoa
Copy link
Collaborator

dalonsoa commented Oct 1, 2024

Done. It should be available as secrets.CODECOV_TOKEN, I think.

@tsmbland
Copy link
Member Author

tsmbland commented Oct 1, 2024

Thanks, although it's not finding it for some reason...

@tsmbland tsmbland marked this pull request as ready for review October 1, 2024 13:58
Copy link
Collaborator

@dalonsoa dalonsoa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, the workflow is failing, but I think it is for good reasons and will work once merged into main. Let's see. We can always undo it if it does not work.

@tsmbland
Copy link
Member Author

tsmbland commented Oct 1, 2024

@dalonsoa You'l have to merge it for me as I'm blocked by branch-protection rules

@dalonsoa dalonsoa merged commit 0a710e5 into main Oct 1, 2024
4 of 5 checks passed
@tsmbland
Copy link
Member Author

tsmbland commented Oct 1, 2024

Still not working 😭 😭 😭 😭

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.

Add pypi badges and coverage badge
2 participants