cpp-coveralls icon indicating copy to clipboard operation
cpp-coveralls copied to clipboard

circleci not supported

Open AndreasAZiegler opened this issue 6 years ago • 1 comments

According to https://github.com/lemurheavy/coveralls-public/issues/1286 coverals-cpp does not support circleci. As I don't want to install node (as I don't need it in my c++ project) I would be glad if cpp-coveralls would support circleci along with travisci.

AndreasAZiegler avatar Mar 21 '19 05:03 AndreasAZiegler

I was able to get it working by faking some environment variables.

https://github.com/tprk77/ttfrm/blob/master/.circleci/config.yml

- run:
    name: Generate and upload coverage
    command: |
      echo -e "service_name: circle-ci\n" > .coveralls.yml \
      && TRAVIS_JOB_ID="#${CIRCLE_BUILD_NUM}" cpp-coveralls -r . -b build_cov -i ttfrm
    # NOTE Here we need to trick cpp-coveralls into doing the right thing

The two important parts are supplying a service_name using the config file (which can be anything other than travis-ci) and setting the job ID with TRAVIS_JOB_ID="#${CIRCLE_BUILD_NUM}".

tprk77 avatar Oct 16 '19 02:10 tprk77