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

[CI] Determine why codecov.io is reporting ~50% coverage instead of ~70% #4563

Closed
unlikelyzero opened this issue Dec 11, 2021 · 11 comments
Closed
Labels
type:maintenance tests, chores, or project maintenance
Milestone

Comments

@unlikelyzero
Copy link
Collaborator

unlikelyzero commented Dec 11, 2021

Summary

After #4561 we're reporting at 53%. Let's investigate why.

Also, need to learn about #4605 (comment)

@unlikelyzero unlikelyzero added the type:maintenance tests, chores, or project maintenance label Dec 11, 2021
@unlikelyzero unlikelyzero added this to the Target: 1.8.2 milestone Dec 11, 2021
@akhenry
Copy link
Contributor

akhenry commented Dec 11, 2021

Istanbul reports line coverage of ~ 70%
Screen Shot 2021-12-10 at 4 20 36 PM

@unlikelyzero unlikelyzero changed the title [CI] Determine why codecov.io is reporting 53% coverage instead of 76% [CI] Determine why codecov.io is reporting ~50% coverage instead of ~70% Dec 11, 2021
@akhenry
Copy link
Contributor

akhenry commented Jan 11, 2022

@scottbell to investigate

@scottbell
Copy link
Contributor

This PR in particular reduced coverage ~13%:
#4550

@scottbell
Copy link
Contributor

I wonder if just adding some code coverage here:
https://app.codecov.io/gh/nasa/openmct/compare/4550/changes
would help things

@scottbell
Copy link
Contributor

One thing @unlikelyzero would like me to check is if istanbul is busted, and what it is doing with test files themselves for test coverage.

@unlikelyzero
Copy link
Collaborator Author

Our istanbul config may need to be modified to ignore our spec files
https://github.com/istanbuljs/nyc#using-include-and-exclude-arrays

@scottbell
Copy link
Contributor

Our istanbul config may need to be modified to ignore our spec files
https://github.com/istanbuljs/nyc#using-include-and-exclude-arrays

Good find!

@scottbell
Copy link
Contributor

scottbell commented Jan 13, 2022

@unlikelyzero found the answer. We were excluding *Spec.js files in Codecov (#4550) but not in our istanbul reporter. Because of this, there was a big drop in code coverage as we removed our ~99% code covered test files from the considered coverage set.

To remedy, I think we should make exclusions & inclusions primarily in istanbul, and use Codecov primarily a dumb report viewer. I've got a PR opened here to do this:
#4714

@scottbell scottbell self-assigned this Jan 13, 2022
@unlikelyzero unlikelyzero added the needs:test instructions Missing testing notes label Jan 14, 2022
@unlikelyzero unlikelyzero removed their assignment Jan 14, 2022
@unlikelyzero
Copy link
Collaborator Author

@scottbell can you add some testing note? Thanks!

@scottbell
Copy link
Contributor

To test, ensure Codecov is reporting the lower 56% number for code coverage, which should be what istanbul is reporting too.

@unlikelyzero unlikelyzero removed the needs:test instructions Missing testing notes label Jan 24, 2022
@shefalijoshi
Copy link
Contributor

Verified Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:maintenance tests, chores, or project maintenance
Projects
None yet
Development

No branches or pull requests

4 participants