Description
When I change my project to use yarn PnP for the monorepo, one of the files code coverage goes from 100% to 33%.
The actual coverage is 100% in the CI:
just-func:coverage: ----------------|---------|----------|---------|---------|-------------------
just-func:coverage: File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s
just-func:coverage: ----------------|---------|----------|---------|---------|-------------------
just-func:coverage: All files | 100 | 100 | 100 | 100 |
just-func:coverage: Just.ts | 0 | 0 | 0 | 0 |
just-func:coverage: index.ts | 0 | 0 | 0 | 0 |
just-func:coverage: testFn.ts | 100 | 100 | 100 | 100 |
just-func:coverage: toJustValue.ts | 100 | 100 | 100 | 100 |
just-func:coverage: ----------------|---------|----------|---------|---------|-------------------
and in the clover.xml:
<file name="toJustValue.ts">
<metrics statements="3" coveredstatements="3" conditionals="4" coveredconditionals="4" methods="1" coveredmethods="1"/>
</file>
That is the file being sent to codecov:
[2022-05-07T23:04:17.741Z] ['info'] => Found 1 possible coverage files:
packages/just-func/coverage/clover.xml
CI/CD URL
Codecov Output
==> linux OS detected
https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
==> SHASUM file signed by key id 806bb28aed779869
==> Uploader SHASUM verified (b2cb60098c868462baebdf4efe586686062997eb9d407dc5ab6085c009f932b7 codecov)
==> Running version latest
==> Running version v0.2.2
/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov -n -Q github-action-3.1.0 -f **/coverage/clover.xml -C 3aa24d2a7366f4b333c3fd1309794143400e9097
[2022-05-07T23:04:17.628Z] ['info']
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Codecov report uploader 0.2.2
[2022-05-07T23:04:17.637Z] ['info'] => Project root located at: /home/runner/work/just-func-typescript/just-func-typescript
[2022-05-07T23:04:17.639Z] ['info'] -> No token specified or token is empty
[2022-05-07T23:04:17.647Z] ['info'] Searching for coverage files...
[2022-05-07T23:04:17.740Z] ['info'] Warning: Some files passed via the -f flag would normally be excluded from search.
[2022-05-07T23:04:17.740Z] ['info'] If Codecov encounters issues processing your reports, please review https://docs.codecov.com/docs/supported-report-formats
[2022-05-07T23:04:17.741Z] ['info'] => Found 1 possible coverage files:
packages/just-func/coverage/clover.xml
[2022-05-07T23:04:17.741Z] ['info'] Processing /home/runner/work/just-func-typescript/just-func-typescript/packages/just-func/coverage/clover.xml...
[2022-05-07T23:04:17.745Z] ['info'] Detected GitHub Actions as the CI provider.
[2022-05-07T23:04:17.747Z] ['info'] Pinging Codecov: https://codecov.io/upload/v4?package=github-action-3.1.0-uploader-0.2.2&token=*******&branch=pr&build=2287827418&build_url=https%3A%2F%2Fgithub.com%2Fjustland%2Fjust-func-typescript%2Factions%2Fruns%2F2287827418&commit=3aa24d2a7366f4b333c3fd1309794143400e9097&job=pull-request&pr=11&service=github-actions&slug=justland%2Fjust-func-typescript&name=&tag=&flags=&parent=
[2022-05-07T23:04:19.001Z] ['info'] https://codecov.io/github/justland/just-func-typescript/commit/3aa24d2a7366f4b333c3fd1309794143400e9097
https://storage.googleapis.com/codecov/v4/raw/2022-05-07/E4E644B4FB1A443E99A123D3CDA10494/3aa24d2a7366f4b333c3fd1309794143400e9097/dbdb7797-ae70-47fc-8433-6319b70a3342.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EKKHVKCKHW7KBCGM7IHR55T63V2PAVJWLVFNITJHDU5G6R5IRN3LMWJA%2F20220507%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20220507T230418Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=faf04c75558235c5ac1613e288e06ee7a80bb242cd43d3f340ab5f3f3256410d
[2022-05-07T23:04:19.001Z] ['info'] Uploading...
[2022-05-07T23:04:19.202Z] ['info'] {"status":"success","resultURL":"https://codecov.io/github/justland/just-func-typescript/commit/3aa24d2a7366f4b333c3fd1309794143400e9097"}
Expected Results
The coverage should match what’s in the CI
Actual Results
Incorrect coverage
Additional Information
One thing I changed is sending coverage to codecov for all 3 NodeJS runs (14, 16, 18).
In the past did some check and only send coverage to codecov if it is running with 16.
But I’m not sure if that would make a difference.