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

Add test coverage from Coveralls in CI #281

Merged
merged 23 commits into from
Aug 24, 2022

Conversation

rhugonnet
Copy link
Member

@rhugonnet rhugonnet commented Aug 12, 2022

During CI in GitHub Actions, we now compute the test coverage, upload it to Coveralls, and display the coverage badge on the README. Our current code is covered by tests at 80%, see details at https://coveralls.io/github/GlacioHack/xdem.

In steps:

  • We now tell pytest to output the coverage with the --cov option,
  • The coverage file is then converted to LCOV format by coveragepy-lcov (needs python>3.8). The issue of creating a LCOV output will be solved soon in pytest: Add support for LCOV output pytest-dev/pytest-cov#536, at which point with can simply pass --cov-report=lcov to pytest,
  • We start Coveralls in parallel, using our token, to process and upload the coverage within the job test,
  • We finish the job in a separate job finish.

@rhugonnet rhugonnet requested a review from adehecq August 17, 2022 14:46
Copy link
Member

@adehecq adehecq left a comment

Choose a reason for hiding this comment

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

Great addition! Thanks for getting into this!

@rhugonnet rhugonnet merged commit 63c3da4 into GlacioHack:main Aug 24, 2022
@rhugonnet rhugonnet deleted the add_coverall_ci branch August 24, 2022 08:13
elischwat added a commit to elischwat/xdem that referenced this pull request Dec 1, 2023
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.

2 participants