coverallsapp / github-action

Coveralls Github Action
https://coveralls.io
MIT License
458 stars 76 forks source link

Empty lcov files break build #164

Closed fornellas closed 1 year ago

fornellas commented 1 year ago

When an lcov file is empty (eg: there were no tests for that case), instead of considering "0%", the build fails with:

Error:  "2023-04-07T23:14:15.262Z"  'error from lcovParse: ' 'Failed to parse string'
Error:  "2023-04-07T23:[14](https://github.com/fornellas/resonance/actions/runs/4642032032/jobs/8215556176?pr=3#step:11:15):15.263Z"  'input: ' ''
Error:  "2023-04-07T23:14:[15](https://github.com/fornellas/resonance/actions/runs/4642032032/jobs/8215556176?pr=3#step:11:16).263Z"  'error from convertLcovToCoveralls'
Error: Failed to parse string

I ended up in this situation as I'm building for different archs, and for some cases, no tests are run (though they might in the future).

mrexox commented 1 year ago

Hey @fornellas! Thank you for the issue. Try out v2 version of this Github action. It should work well with empty lcov files if you provide allow-empty: true option.

v1 (and current master) has some limitations including these:

v2 eliminates all these limitations, since it uses a coverage-reporter CLI tool to report the coverage. If you have any issues moving to v2 I'll be glad to help. See UPGRADE.md for details.