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

Coverage results differ between local and Github Actions environments #7

Closed
mttschltz opened this issue Jan 17, 2022 · 1 comment
Closed
Labels
devops Test automation, deployment, observability

Comments

@mttschltz
Copy link
Owner

Already solved but adding details for posterity.

Context

In 6fbd4fe I set coverage thresholds to be 100% after reaching that level while testing locally.

It passed locally but failed on Github Actions where the percentages were < 100%.

Left = local results; Right = Github Actions
image

Troubleshooting attempts

I tried

  • --no-cache when calling jest, locally and remote
  • jest --clearCache locally
  • Removing cache: yarn from .github/workflows/matt-fyi-cd.yml
  • Cloning and installing the repo from scratch locally
  • Updating my local yarn version to be the same as Github Actions (Node version was already the same)

None of those helped.

Changing coverage provider

I changed coverageProvider in Jest from v8 to babel (the actual default) and the results were consistent between local and Github Actions environments.

I have read that v8 is still experimental, though is apparently faster. So we may want to investigate changing back to it in the future.

@mttschltz mttschltz added the devops Test automation, deployment, observability label Jan 17, 2022
@mttschltz
Copy link
Owner Author

Solved in d89e7b8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devops Test automation, deployment, observability
Projects
None yet
Development

No branches or pull requests

1 participant