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

Show code coverage #1223

Closed
gr2m opened this issue Sep 14, 2018 · 8 comments
Closed

Show code coverage #1223

gr2m opened this issue Sep 14, 2018 · 8 comments
Assignees

Comments

@gr2m
Copy link
Member

gr2m commented Sep 14, 2018

We have a coverage badge in our README but it currently shows "unknown". Let’s fix that, as discussed at #1202

@lock
Copy link

lock bot commented Sep 28, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you!

@lock lock bot locked as resolved and limited conversation to collaborators Sep 28, 2018
@nockbot
Copy link
Collaborator

nockbot commented Oct 9, 2018

🎉 This issue has been resolved in version 10.0.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@RichardLitt
Copy link
Member

This still shows Unknown - I think because the Coveralls is drawing from the coverage-setup branch and not the master branch. I spent 15 minutes and still have no idea how to switch this. I also wasn't able to upload the coveralls via the npm script:

11:05 ~/src/nock (coverage-setup) * 🐕  npm run coverage:upload

> nock@0.0.0-development coverage:upload /Users/richard/src/nock
> tap --coverage-report=text-lcov | coveralls


/Users/richard/src/nock/node_modules/coveralls/bin/coveralls.js:18
        throw err;
        ^
Bad response: 500 {"message":"Build processing error.","error":true,"url":""}
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! nock@0.0.0-development coverage:upload: `tap --coverage-report=text-lcov | coveralls`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the nock@0.0.0-development coverage:upload script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/richard/.npm/_logs/2018-11-07T16_05_36_486Z-debug.log

Any ideas?

@gr2m
Copy link
Member Author

gr2m commented Dec 16, 2018

I investigated further and there is something odd ... I can reproduce when I run this locally using Coverall’s repo token

$ npm test
# ...
$ OVERALLS_REPO_TOKEN=<secret> ltap --coverage-report=text-lcov | ./node_modules/.bin/coveralls
[error] "2018-12-16T17:11:17.272Z"  'error from lcovParse: ' 'Failed to parse string'
[error] "2018-12-16T17:11:17.275Z"  'input: ' 'Successfully piped to Coveralls\n'
[error] "2018-12-16T17:11:17.275Z"  'error from convertLcovToCoveralls'

@gr2m
Copy link
Member Author

gr2m commented Dec 16, 2018

oh looks like when setting the OVERALLS_REPO_TOKEN variable, piping to | coveralls is not necessary and throw an error. It successfully uploaded coverage now though: https://coveralls.io/github/nock/nock

I’ll try to set OVERALLS_REPO_TOKEN env variable on Travis now, maybe that’ll help

@gr2m
Copy link
Member Author

gr2m commented Dec 16, 2018

aaaaaand we are back in coverage business \o/ https://travis-ci.org/nock/nock/jobs/468705770

@gr2m gr2m closed this as completed Dec 16, 2018
@RichardLitt
Copy link
Member

Yeah! Good work, Gregor!

@lock
Copy link

lock bot commented Dec 31, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue and add a reference to this one if it’s related. Thank you!

@lock lock bot locked as resolved and limited conversation to collaborators Dec 31, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants