Skip to content

Commit

Permalink
Generate coverage with Rust nightly
Browse files Browse the repository at this point in the history
Fixes #177

Thanks @marco-c!
  • Loading branch information
garious committed Jun 18, 2018
1 parent c40000a commit c7fd428
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 11 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ To generate code coverage statistics, run kcov via Docker:
```bash
$ ./ci/coverage.sh
```
The coverage report will be written to `./target/cov/index.html`
The coverage report will be written to `./target/cov/report/index.html`


Why coverage? While most see coverage as a code quality metric, we see it primarily as a developer
Expand Down
3 changes: 0 additions & 3 deletions ci/buildkite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ steps:
name: "stable [public]"
timeout_in_minutes: 20
- wait
- command: "ci/coverage.sh"
name: "coverage [public]"
timeout_in_minutes: 20
- command: "ci/docker-run.sh rustlang/rust:nightly ci/test-nightly.sh || true"
name: "nightly - FAILURES IGNORED [public]"
timeout_in_minutes: 20
Expand Down
10 changes: 3 additions & 7 deletions ci/coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@

cd "$(dirname "$0")/.."

ci/docker-run.sh evilmachines/rust-cargo-kcov \
bash -exc "\
export RUST_BACKTRACE=1; \
cargo build --verbose; \
cargo kcov --lib --verbose; \
"
cargo install cargo-cov
cargo cov test

echo Coverage report:
ls -l target/cov/index.html
ls -l target/cov/report/index.html

if [[ -z "$CODECOV_TOKEN" ]]; then
echo CODECOV_TOKEN undefined
Expand Down
1 change: 1 addition & 0 deletions ci/test-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ rustup component add rustfmt-preview
cargo build --verbose --features unstable
cargo test --verbose --features unstable
cargo bench --verbose --features unstable
ci/coverage.sh

exit 0

0 comments on commit c7fd428

Please sign in to comment.