Skip to content
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

Travis failing to publish code coverage to Coveralls #33

Closed
j-richey opened this issue Apr 18, 2020 · 2 comments
Closed

Travis failing to publish code coverage to Coveralls #33

j-richey opened this issue Apr 18, 2020 · 2 comments

Comments

@j-richey
Copy link
Owner

Describe the bug
Travis has stopped sending code coverage reports to Coveralls. This was noticed when creating the v0.1.2 release.

First, the job that pushes the code coverage report was not appearing in the build matrix. After a bit of hacking to get it to appear in the matrix and get the job to run there was a problem with the cargo coveralls command:

error: failed to parse lock file at: /home/travis/build/j-richey/open_ttt_lib/Cargo.lock

Steps to reproduce

  1. Create a branch to kick off a Travis build.
  2. Observe Travis' build matrix does not include an stable Linux Rust job.
  3. Remove the jobs/exclude keys and push the change.
  4. Observe that two stable Linux Rust jobs in the matrix.
  5. However, the one that tries to push to coveralls ends with the error message "error: failed to parse lock file at: /home/travis/build/j-richey/open_ttt_lib/Cargo.lock"

Library Version:
Use the .travis.yaml from 0.1.2 build was used.

Expected behavior
Code coverage should be generated with every Travis build.

Additional context
Here is a resource that might be useful when debugging .travis.yaml file issues: https://config.travis-ci.com/explore

@j-richey
Copy link
Owner Author

After some research I found the following:

  • Currently, the build is using the cargo-travis along with kcov to generate coverage data and submit it to coveralls. There is a known issue parsing the Cargo.lock file.
  • The cargo-tarpaulin crate might be more useful to us. It is more widely used than cargo-travis, seems to get more frequent updates, supports generating local coverage reports, and contains support for pushing to coveralls.

j-richey added a commit that referenced this issue May 31, 2020
The build was using the cargo-travis along with kcov to generate
coverage data and submit it to coveralls. Unfortunately, this stopped
working due to a Rust update (roblabla/cargo-travis#66).
Additionally, it was difficult to run this tool locally.

This commit uses cargo-tarpaulin to generate the test coverage data and
upload it to coveralls. Additionally, developers with Linux can easily
generate coverage reports locally with tarpaulin. The CONTRIBUTING file
is updated with instructions on how to generate coverage reports.

See issue #33.
@j-richey
Copy link
Owner Author

j-richey commented Jun 3, 2020

The project has been updated to use cargo-tarpaulin and its successfully publishing to Coveralls. Additionally, the CONTRIBUTING.md file has been updated on how to run cargo-tarpaulin locally.

@j-richey j-richey closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant