Skip to content
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

Wrong documentation for coverage with codecov.io #298

Closed
dotnetCarpenter opened this issue Aug 29, 2016 · 10 comments
Closed

Wrong documentation for coverage with codecov.io #298

dotnetCarpenter opened this issue Aug 29, 2016 · 10 comments

Comments

@dotnetCarpenter
Copy link
Contributor

I just learned that you can not write "posttest": "tap --coverage-report=lcov | codecov" as the docs suggest.

You have to write "posttest": "tap --coverage-report=lcov > coverage.json && codecov"

@dotnetCarpenter
Copy link
Contributor Author

Ping @stevepeak

@isaacs
Copy link
Member

isaacs commented Aug 30, 2016

That's a docs bug. I'll fix it soonish unless someone else beats me to a pr :)

@dotnetCarpenter
Copy link
Contributor Author

@isaacs hang on.
I might have a PR for codecov that enable piped input.

Right now the docs says
tap --coverage-report=lcov | codecov which should be tap --coverage-report=text-lcov | codecov if piping is supported by codecov-node.

What would work now is: tap --coverage-report=lcov && codecov - codecov will find the coverage/lcov.info file and upload it.

@isaacs
Copy link
Member

isaacs commented Sep 1, 2016

@dotnetCarpenter Gotcha. i'll update the docs now to what works. It's easy enough to change again later if there's a better way :)

@isaacs
Copy link
Member

isaacs commented Sep 1, 2016

71b8728

@isaacs isaacs closed this as completed Sep 1, 2016
@stevepeak
Copy link

Hey @isaacs and @dotnetCarpenter we are adding partial line coverage support this week.

image

https://cl.ly/3I0S172c4736

This requires the coverage.json file only to be uploaded. Can we arrange this?

@dotnetCarpenter
Copy link
Contributor Author

@stevepeak I assume you mean the coverage.json that istanbul cover produce. But I don't know what is the difference between lcov and coverage.json, besides the data format. Do you mean that you only accept JSON or that the data quality differs between coverage.json and lcov?

I'm asking this because I got code that takes what-ever is piped to codecov-node and append it to the upload variable. E.g. upload += '# path=piped\n' + args.options.pipe.join('') + '\n<<<<<< EOF\n';

@stevepeak
Copy link

the difference between lcov and coverage.json, besides the data format

The json document provides column aware coverage data which enables us to provide higher detailed coverage overlay and more accuracy in detecting partial line coverage (as seen in screenshot above). The lcov is simple line:cov data and is not column aware.

Do you mean that you only accept JSON or that the data quality differs between coverage.json and lcov?

Yes. I'm looking into ways of ignoring the lcov data entirely as it could override the column aware data. This is still yet to be determined, but we only need the json file in the near future.

@dotnetCarpenter
Copy link
Contributor Author

Hmmm.. Not sure how tap sends arguments to nyc. But if the reporter is json and the file is - then I think we can pipe JSON to codecov.

Something like: tap test/* --coverage-report=json --file=- but it doesn't work.

@stevepeak
Copy link

It's ok to produce the lcov and json reports. We just prefer the json reports for uploading.

Still working on a way to ignore lcov when json is found.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants