File tree Expand file tree Collapse file tree 2 files changed +29
-1
lines changed
Expand file tree Collapse file tree 2 files changed +29
-1
lines changed Original file line number Diff line number Diff line change @@ -17,10 +17,16 @@ jobs:
1717 - run : cargo test --all-features
1818 - run : cargo doc --no-deps
1919 - run : cargo clippy --all-features -- -D warnings
20-
2120 - store_artifacts :
2221 path : target/doc
2322 destination : doc
23+ - run :
24+ name : Gather Coverage
25+ command : ./coverage.sh --html
26+ - store_artifacts :
27+ name : Upload Coverage
28+ path : target/llvm-cov/html
29+ destination : coverage
2430 - run :
2531 command : make start-contract-test-service
2632 background : true
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ set -o errexit
4+ set -o pipefail
5+
6+ # We are using an older version of the toolchain for now as there is a bug with
7+ # coverage generation. See https://github.com/rust-lang/rust/issues/79645
8+ export RUSTUP_TOOLCHAIN=nightly-2022-01-09
9+
10+ # cargo-llvm-cov requires the nightly compiler to be installed
11+ rustup toolchain install $RUSTUP_TOOLCHAIN
12+ rustup component add llvm-tools-preview --toolchain $RUSTUP_TOOLCHAIN
13+ cargo install cargo-llvm-cov
14+
15+ # generate coverage report to command line by default; otherwise allow
16+ # CI to pass in '--html' (or other formats).
17+
18+ if [ -n " $1 " ]; then
19+ cargo llvm-cov --all-features --workspace " $1 "
20+ else
21+ cargo llvm-cov --all-features --workspace
22+ fi
You can’t perform that action at this time.
0 commit comments