2

According to Coveralls public documentation (https://docs.coveralls.io/), "Your code must be hosted on GitHub, BitBucket, or GitLab".

Then the package "coveralls" in npm (https://www.npmjs.com/package/coveralls) says that "This script bin/coveralls.js can take standard input from any tool that emits the lcov data format (including mocha's LCOV reporter) and send it to coveralls.io to report your code coverage there."

So what this package actually does is sending the output (coverage report) of other tools like nyc/jest/istanbul into coveralls instead of finding the test coverage on its own? Then what's the meaning of this npm package?

Is Coveralls/Codecov only available to projects in the cloud that use CI services? Is there a way to use Coveralls/Codecov to get the test coverage result of my local npm packages locally like what nyc/jest/istanbul does?

LGDGODV
  • 263
  • 1
  • 10
  • Looks like Coveralls is, at its core, a closed-source cloud service. The CI capability and the NPM package are just interfaces to that service. – Ouroborus Oct 26 '21 at 07:31

1 Answers1

1

You can use Codecov binary uploader to push coverage reports from your local. It will process the report and show you the coverage % in the Codecov UI. I'm not sure if it will be able to post a PR comment or otherwise work as expected, without CI integration. But to get the basics of just getting the coverage numbers, you can try uploading from your machine. Just be sure to grab the correct binary for your OS.

vladko
  • 1,013
  • 14
  • 21