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

Commit c7fd428

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

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,7 @@ To generate code coverage statistics, run kcov via Docker:
231231
```bash
232232
$ ./ci/coverage.sh
233233
```
234-
The coverage report will be written to `./target/cov/index.html`
234+
The coverage report will be written to `./target/cov/report/index.html`
235235

236236

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

ci/buildkite.yml

-3
Original file line numberDiff line numberDiff line change
@@ -3,9 +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
96
- command: "ci/docker-run.sh rustlang/rust:nightly ci/test-nightly.sh || true"
107
name: "nightly - FAILURES IGNORED [public]"
118
timeout_in_minutes: 20

ci/coverage.sh

+3-7
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

+1
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)