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

Code coverage failing on PRs #7893

Closed
sidharthv96 opened this issue Mar 28, 2020 · 13 comments
Closed

Code coverage failing on PRs #7893

sidharthv96 opened this issue Mar 28, 2020 · 13 comments
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:infra Issues about CI, publishing to npm, or similar

Comments

@sidharthv96
Copy link
Contributor

The github workflow for coverage running on node 12 - ubuntu is consistently failing across PRs.

@sidharthv96
Copy link
Contributor Author

@sosukesuzuki You are also facing the same issue right?

@sosukesuzuki
Copy link
Member

@sidharthv96 yes, the action seems to fail if the test takes a long time to run. This is a problem, but unfortunately we will have to ignore it for now.

/cc @thorn0 @fisker Do you have a solution for this?

@sosukesuzuki sosukesuzuki added the type:infra Issues about CI, publishing to npm, or similar label Mar 28, 2020
@sidharthv96
Copy link
Contributor Author

image
Seems like coverage isn't generated at all.

@fisker
Copy link
Sponsor Member

fisker commented Mar 28, 2020

Not sure how to fix it.

@sidharthv96 Is this from github actions job?

@sidharthv96
Copy link
Contributor Author

sidharthv96 commented Mar 28, 2020

@fisker No, that was from my local.

==> Detecting git/mercurial file structure
==> Reading reports
    - Skipping empty file ./coverage/lcov.info
--> No coverage data found.
    Please visit http://docs.codecov.io/docs/supported-languages
    search for your projects language to learn how to collect reports.

This is from actions.

I'm checking why jest stopped picking up the coverage. Do you know any recent commits that might've caused the issue?

@fisker
Copy link
Sponsor Member

fisker commented Mar 28, 2020

Local test don't collect coverage by default, you can run yarn test --collectCoverage.

@fisker
Copy link
Sponsor Member

fisker commented Mar 28, 2020

Seems it stopped collect coverage from jest upgrade commit.

@sidharthv96
Copy link
Contributor Author

I used ENABLE_CODE_COVERAGE flag.
Yeah, downgraded jest and running test now.

@sidharthv96
Copy link
Contributor Author

@fisker Tried downgrading to 25.1.0 and ran tests with yarn test --collectCoverage. Still no coverage locally.

#7894 will help test the CI

@sidharthv96
Copy link
Contributor Author

Any chance there is a mock fs?

When using mock-fs make sure to run mock.restore() when your tests are done running, or else the reports wont get generated on the CI.

@SimenB
Copy link
Contributor

SimenB commented Mar 29, 2020

This is a bug in Jest, fix here: jestjs/jest#9724. I'll release a patch sometime today.

"resolutions": {
  "@jest/transform": "25.1.0"
}

in package.json works in the meantime, or just reverting the upgrade for now.

@SimenB
Copy link
Contributor

SimenB commented Mar 29, 2020

@thorn0
Copy link
Member

thorn0 commented Mar 29, 2020

closed by #7901

@thorn0 thorn0 closed this as completed Mar 29, 2020
@github-actions github-actions bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jun 28, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. type:infra Issues about CI, publishing to npm, or similar
Projects
None yet
5 participants