Skip to content

Update coverage workflow, report separate unit vs integration #1509

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

Merged
merged 20 commits into from
Jul 18, 2022

Conversation

rly
Copy link
Contributor

@rly rly commented Jul 15, 2022

Motivation

Our code coverage workflow runs only unit tests, however, the coverage percentage considers all lines of code in pynwb, including the IO module code, which is not run by the unit tests.

This PR changes the coverage workflow to run the unit tests and integration tests separately, adds flags "unit" and "integration" to each codecov upload so that we can distinguish them and get separate coverage percentages, and also updates the rest of the workflow to newer versions of Actions.

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running flake8 from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.

@codecov
Copy link

codecov bot commented Jul 15, 2022

Codecov Report

Merging #1509 (f165e69) into dev (2dc6351) will increase coverage by 11.88%.
The diff coverage is n/a.

@@             Coverage Diff             @@
##              dev    #1509       +/-   ##
===========================================
+ Coverage   78.64%   90.52%   +11.88%     
===========================================
  Files          37       25       -12     
  Lines        2777     2460      -317     
  Branches      517      456       -61     
===========================================
+ Hits         2184     2227       +43     
+ Misses        510      148      -362     
- Partials       83       85        +2     
Flag Coverage Δ
integration 69.87% <ø> (?)
unit 83.94% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/pynwb/legacy/io/icephys.py
src/pynwb/legacy/io/epoch.py
src/pynwb/legacy/io/ophys.py
src/pynwb/legacy/map.py
src/pynwb/legacy/io/file.py
src/pynwb/legacy/io/misc.py
src/pynwb/legacy/io/behavior.py
src/pynwb/legacy/io/image.py
src/pynwb/legacy/io/ogen.py
src/pynwb/legacy/io/base.py
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2dc6351...f165e69. Read the comment docs.

@rly rly changed the title [WIP] Update coverage workflow, report separate unit vs integration Update coverage workflow, report separate unit vs integration Jul 17, 2022
@rly rly marked this pull request as ready for review July 17, 2022 14:33
@rly rly requested a review from oruebel July 17, 2022 14:34
oruebel
oruebel previously approved these changes Jul 18, 2022
Copy link
Contributor

@oruebel oruebel left a comment

Choose a reason for hiding this comment

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

Looks good to me. Just to clarify, do I understand the changes correctly that with this we should get 3 coverage reports: 1) unit only, 2) integration tests only, 3) combined coverage?

@rly
Copy link
Contributor Author

rly commented Jul 18, 2022

Yes. I am not sure you can view each report separately on the codecov website though.

image

I remembered we have badges in the README. I just updated the badges to report those 3 report percentages.

@rly rly merged commit 1315a0d into dev Jul 18, 2022
@rly rly deleted the update_coverage_action branch July 18, 2022 22:04
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