-
Notifications
You must be signed in to change notification settings - Fork 34
Add integration with codecov #2
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
Conversation
Current coverage is
|
uhmm https://codecov.io/github/albfan/example-bash/commits rebased commit is detected, but since no code changes on it, codecov ignores it. That's wrong!. |
Is it possible to use the I'm not sure what happened on the rebase. Is there something wrong on our end? |
I will add traces on bashcov. Seems it is the faulty piece on 0% code coverage. |
18cffe0
to
a1205b4
Compare
All is clear now. bashcov is based on https://www.gnu.org/software/bash/manual/html_node/Bash-Variables.html and script is not executed against bash if shebang is not set explicit. I can imagine you can do bashcov bash script or something like that https://codecov.io/github/albfan/example-bash/script.sh?ref=a1205b45abc86cd6c7210c6621b7fedf201815c6 But real question is the codecov example bash. How is it suppose to work with Another thing to consider supporting bashcov is it generates local reports (don't miss the great part of show coverage until you push to repo) |
@albfan we do have a Bash uploader: https://github.com/codecov/codecov-bash that would be the preferred uploader for this case |
I will try and compare results. |
I have rebased all the work, to expose my contribution and your upload style suggestion I think you miss the point at all. See compilation https://travis-ci.org/albfan/example-bash It is looking for gcov output to upload reports. Here we have no report generated. bashcov is the report generator, but it's based on simplecov and use your simplecov uploader to upload its results. There's no gcov results on bashcov. Now you need to make a decision. Support bash through gcov data reports (don't know a tool for that ) or use your existing working uploader with a gem install (really typical workflow on travis) For me bashcov is the way to go, so let me know if sometime it's an option for you. I have a succesful workflow and hope others can benefit for it, but seems you're not agnostic about tools to upload reports. You are facing the most typical mistake for a wide scope service (the cathedral and the bazaar) https://en.wikipedia.org/wiki/The_Cathedral_and_the_Bazaar I'm pretty confortable with my bazaar as it let me stick on the edge of all these new tecnologies arising, when one gets obsolete or gets the wrong way, I simply change the tool. We are working here to improve bashcov: Feel free to suggest or point out anything there |
I still don't fully understand the use of simplecov in this. The straight forward simple question I have is: can bashcov, without simplecov, produce any coverage export? If that is a yes, then I propose skipping simplecov and uploading these directly to Codecov. According to bashcov usage it appears to have a html export...does this require simplecov? Is there any other formats: xml, json, txt?
The Bash uploader calls
I'm happy to share more on this if you'd like in a Skype call. This may be very helpful because I feel lost like I'm not on the right wavelength with all this... Thank you :) |
simplecov offers a coverage api. Forget the ruby part. On top of simplecov, you can build a coverage tool for whatever. That's the idea behind bashcov. Using xtrace bash option, execute a bash script, and detect covered lines from bash execution. bashcov make that part and left the rest to simplecov. By default simplecov offers "SimpleCov::Formatter::HTMLFormatter". I find it useful (see I added it by default) but in this world of cloud services, that part could simply be ignored (adding a so at this point, you have the simplecov data report generated (in memory) how to upload to codecov?. Hey! all work is done, you have a simplecov formatter that does all the work: https://github.com/codecov/codecov-ruby From CatB:
that's what codecov-ruby is. Forget what's behind scenes, here you have:
You are ready to go. Contact me on my email. I will be really pleased to do that skype call. |
resolves #1
https://codecov.io/github/albfan/example-bash
https://travis-ci.org/albfan/example-bash
See
is a patch meanwhile PR is accepted
Anyway I found a common problem on your system. It caches too much and doesn't realize HEAD was rebased.
if you issue:
you will see a coverage of 87%
Don't know how to refresh code. (See actual .travis.yml remove bashcov gem compilation and codecov shows it as if exists)