Skip to content
This repository was archived by the owner on Jan 22, 2025. It is now read-only.

Commit 3e052a9

Browse files
committed
Generate coverage with Rust nightly
Fixes #177 Thanks @marco-c!
1 parent b2accd1 commit 3e052a9

File tree

4 files changed

+5
-15
lines changed

4 files changed

+5
-15
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ To generate code coverage statistics, run kcov via Docker:
239239
```bash
240240
$ ./ci/coverage.sh
241241
```
242-
The coverage report will be written to `./target/cov/index.html`
242+
The coverage report will be written to `./target/cov/report/index.html`
243243

244244

245245
Why coverage? While most see coverage as a code quality metric, we see it primarily as a developer

ci/buildkite.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ steps:
33
name: "stable [public]"
44
timeout_in_minutes: 20
55
- wait
6-
- command: "ci/coverage.sh"
7-
name: "coverage [public]"
8-
timeout_in_minutes: 20
9-
retry:
10-
automatic:
11-
- exit_status: "*"
12-
limit: 2
136
- command: "ci/docker-run.sh rustlang/rust:nightly ci/test-nightly.sh"
147
name: "nightly [public]"
158
timeout_in_minutes: 20

ci/coverage.sh

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@
22

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

5-
ci/docker-run.sh evilmachines/rust-cargo-kcov \
6-
bash -exc "\
7-
export RUST_BACKTRACE=1; \
8-
cargo build --verbose; \
9-
cargo kcov --lib --verbose; \
10-
"
5+
cargo install cargo-cov
6+
cargo cov test
117

128
echo Coverage report:
13-
ls -l target/cov/index.html
9+
ls -l target/cov/report/index.html
1410

1511
if [[ -z "$CODECOV_TOKEN" ]]; then
1612
echo CODECOV_TOKEN undefined

ci/test-nightly.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@ rustup component add rustfmt-preview
1010
cargo build --verbose --features unstable
1111
cargo test --verbose --features unstable
1212
cargo bench --verbose --features unstable
13+
ci/coverage.sh
1314

1415
exit 0

0 commit comments

Comments
 (0)