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:
17
17
- run : cargo test --all-features
18
18
- run : cargo doc --no-deps
19
19
- run : cargo clippy --all-features -- -D warnings
20
-
21
20
- store_artifacts :
22
21
path : target/doc
23
22
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
24
30
- run :
25
31
command : make start-contract-test-service
26
32
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