cargo-edit icon indicating copy to clipboard operation
cargo-edit copied to clipboard

Code coverage data not getting uploaded successfully

Open bjgill opened this issue 8 years ago • 2 comments

https://coveralls.io/github/killercup/cargo-edit would seem to suggest that coveralls has seen no coverage data since 2016.

We've currently got the following in `.travis.yml':

- env COVERAGE_TESTING=1 travis-cargo --only stable coveralls --no-sudo

Perhaps the environment variable is responsible?

bjgill avatar Dec 23 '17 09:12 bjgill

Is the coverage data any good? Last I checked it was hard to tell if it was trustworthy or just a random number. I don't think the env on Travis has changed but I can check again.

Benjamin Gill [email protected] schrieb am Sa. 23. Dez. 2017 um 10:41:

https://coveralls.io/github/killercup/cargo-edit would seem to suggest that coveralls has seen no coverage data since 2016.

We've currently got the following in `.travis.yml':

  • env COVERAGE_TESTING=1 travis-cargo --only stable coveralls --no-sudo

Perhaps the environment variable is responsible?

Also, once this is fixed, we should add the coveralls badge to the readme.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/killercup/cargo-edit/issues/185, or mute the thread https://github.com/notifications/unsubscribe-auth/AABOX0w2dZyr_RSmgyI1q6SmcoXhpE1Nks5tDMrZgaJpZM4RLoAS .

killercup avatar Dec 23 '17 10:12 killercup

I've found using kcov on Travis to be a constant source of frustration for my Rust projects, but I did get it working again for some of them. Here's an example travis config.

Some things to note:

  • travis-cargo's coverage support has been broken for a long time, so you need to explicitly invoke kcov.
  • kcov needs libiberty for --verify to work, so I had to add that to the apt packages list.
  • kcov crashes dealing with source files that aren't part of your project, so I had to add --exclude-pattern=/.cargo --include-pattern=$PWD to make things work. (It's possible that the --include-pattern there is sufficient, I didn't test that.)

luser avatar Feb 01 '18 15:02 luser