WordPoints / dev-lib

Developer tools for WordPoints projects
MIT License
4 stars 0 forks source link

Travis CI: coveralls broken #109

Closed JDGrimes closed 7 years ago

JDGrimes commented 8 years ago

The uploading of code coverage data to coveralls is broken. The error we're getting is this:

 [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]  
 Unrecognized option "src_dir" under "coveralls"                                

This is due to the src_dir option being removed in 1.0.0.

The newest version requires the use of the --root_dir flag instead.

JDGrimes commented 8 years ago

Note that in the hooks API I've explored using codecove.io instead of coveralls. It works, though to really use it you need to install a browser plugin which will overlay coverage data on the GitHub repository. The reason that I tried using it instead of coveralls was because I thought that coveralls might not be processing the coverage data correctly (and possibly also because it was broken, as this issue points out—I don't remember). I'm actually not sure that code coverage on HHVM is as accurate as on vanilla PHP, but that's just conjecture since I haven't tried running the coverage pass on a different version of PHP in a while. Anyway, that'd be for another ticket I guess.

JDGrimes commented 8 years ago

This is still broken: https://travis-ci.org/WordPoints/hooks-api/jobs/103964750

JDGrimes commented 8 years ago

Now it is saying that the coverage XML file isn't readable:

$ source $DEV_LIB_PATH/travis/after_script.sh

  [Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]  

  coverage_clover XML file is not readable                                       

Perhaps it no longer supports wildcards?

JDGrimes commented 8 years ago

Testing this with php-coveralls 0.7.0 worked. So let's just pin the version at that instead of using dev-master.

JDGrimes commented 8 years ago

We still need to add src_dir: src back to the coveralls.yml file though.

JDGrimes commented 8 years ago

For some reason this still isn't working on WordPoints. The only difference that I can see between there and the hooks API is that in the hooks API we have our own .coveralls.yml file, but in WordPoints core it is symlinked from the dev lib. Maybe the whole issue has just been that symlinks aren't supported by coveralls.

JDGrimes commented 8 years ago

Apparently the symlink isn't the issue.

JDGrimes commented 8 years ago

The error we're getting seems to be an indicator that coveralls had trouble globbing for the files. That is, that nothing was found matching the path. In other words, I don't think it means that the file(s) themselves couldn't be read; just none were found with a matching path.

Unfortunately, we aren't told exactly which line the error is on (there are at least two places it could come from) or exactly where the php-coveralls script was looking. Our files are indeed at $(cwd)/build/logs/clover-*.xml, but we don't know the full path of where php-coveralls is looking. It seems that it must be looking in a different directory somehow, or something.

JDGrimes commented 8 years ago

We don't even know for sure what coveralls is looking for either, it may not be using our configuration or something.

JDGrimes commented 8 years ago

coveralls:v1:jobs [-c|--config [CONFIG]] [--dry-run] [--exclude-no-stmt] [-e|--env [ENV]] [-x|--coverage_clover COVERAGE_CLOVER] [-r|--root_dir [ROOT_DIR]]

Maybe we need to try specifying the --coverage_clover option. Or maybe we just need to specify --config specifically.

JDGrimes commented 7 years ago

Enough of messing with coveralls, it just isn't being maintained very well right now. Let's switch to codecov.io instead.