Coveralls report shows 0% coverage for NodeJS
microshine opened this issue · 2 comments
Hi. I'm using this action for a long time. Thank you for this useful tools. But now I've got some problems with some of my projects, they show 0% coverage, although text-summary
shows non-empty coverage result.
I did some researches and found that SF
records in lcov
file has strange file path record.
It looks like coveralls
cannot find out file via fs.existsSync
function in convertLcovToCoveralls
function
Here is my CI test with DEBUG enabled for coveralls
https://github.com/PeculiarVentures/node-webcrypto-p11/runs/6901190120?check_suite_focus=true
You can see that file paths contain mixed paths SF:<folder path>file:<file path>
SF:src/mechs/shake/file:/Users/runner/work/node-webcrypto-p11/node-webcrypto-p11/src/mechs/shake/shake128.ts\n
It's possible that lcov
reporter works incorrectly. I'm looking for information about it
I've updated my CI YAML file to fix this problem.
- name: Update lcov.info
run: |
sed -E "s/SF:(.+file:(.+))/SF:\2/g" ./coverage/lcov.info > coverage/lcov.new.info
mv ./coverage/lcov.new.info ./coverage/lcov.info