-
Notifications
You must be signed in to change notification settings - Fork 114
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 'collectCoverageForm' configuration to track all files for Jest coverage #1143
Conversation
@jiji14 it looks like the code coverage action is failing consistently; can you please take a look? It looks to me like the upload is failing - I am not sure
Here's a related SO post If the only solution is to use secrets, it won't work in a PR any more (recall that secrets are not available to PRs). We have to |
Certainly! Here's the corrected version: @shankari I've researched how to fix this issue before, but I wasn't able to find one except for adding a token (which doesn't work for our project). Should I try |
@shankari There are multiple issues regarding this, and I don't think we can fix it on our own. What should I do for the next step? 1. Waiting for the Codecov team 2. Using Jest code coverage report temporarily [ Related Issues ] |
@jiji14 I don't think that all the issues that you have linked to are related. At least two relate to uploads with tokens. Since we are attempting to use In #1143 (comment), I indicated that
I am not sure what "Using Jest code coverage report temporarily", can you clarify? |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1143 +/- ##
===========================================
- Coverage 77.49% 27.32% -50.17%
===========================================
Files 29 113 +84
Lines 1693 4816 +3123
Branches 370 1037 +667
===========================================
+ Hits 1312 1316 +4
- Misses 381 3498 +3117
- Partials 0 2 +2
Flags with carried forward coverage won't be shown. Click here to find out more. |
Sorry, I was completely on the wrong page. The issue arose after a recent update from the Codecov team. The error was caused by the v3 action using the v4 API. The simple solution was to update from v3 to v4. Here is the related issue: link to the issue. With Codecov v4, tokenless uploading is unsupported. However, pull requests made from forks to the upstream public repositories will support tokenless uploading (e.g., contributors to open-source projects do not need the upstream repository's Codecov token). Therefore, even without a token, we can still upload the report. I referred to this link: https://github.com/codecov/codecov-action I checked that the Codecov report was successfully uploaded after updating the version. However, the |
Great job, @jiji14! |
@jiji14 @JGreenlee after merging this, the CI broke The error is
I don't think this is related to the change, it may just be a missing/obsolete dependency. In other words, there might be a change to the packages published on npm that causes this to break. Can you take a look? |
@shankari sure I will! |
Related Issue
e-mission/e-mission-docs#1064
Overview
We have been ignoring files not included in the test folder when calculating coverage. To improve this, I added the
collectCoverageFrom
configuration.For more information, please refer to this document: https://jestjs.io/docs/configuration#collectcoveragefrom-array
Code coverage report after adding
collectCoverageFrom