EDIT: It is currently not possible to merge multiple coverage results generated by Code Climate. In a parallel build where more than one container reports the coverage to Code Climate, only the very first payload received for a certain build will be interpreted. Additional coverage reports sent in will be discarded. The only way to work around this is to use an alternative coverage solution.
To make sure that the coverage is reported correctly to Code Climate in your parallel builds, you’ll need to make sure that, after the coverage run has finished, the results are concentrated on a single machine (for example container 0), merged together and reported from there.
We suggest using the SSH between build containers feature to transfer the coverage info between machines. For example, the following will copy the
~/SampleProject/coverage.xml file to the container 0 from containers 1 to 5:
test: post: - "for i in $(seq 1 5) ; do scp node$i:~/SampleProject/coverage.xml coverage-node$i.xml ; done"
You can use Code Climate CLI to merge the coverage into a single file before reporting it back to Code Climate.