Revive code coverage
This commit is contained in:
@ -12,7 +12,7 @@ steps:
|
|||||||
- command: "ci/shellcheck.sh"
|
- command: "ci/shellcheck.sh"
|
||||||
name: "shellcheck [public]"
|
name: "shellcheck [public]"
|
||||||
timeout_in_minutes: 20
|
timeout_in_minutes: 20
|
||||||
- command: "ci/docker-run.sh solanalabs/rust-nightly:2018-09-28 ci/test-nightly.sh || true"
|
- command: "ci/docker-run.sh solanalabs/rust-nightly:2018-09-28 ci/test-nightly.sh"
|
||||||
name: "nightly [public]"
|
name: "nightly [public]"
|
||||||
env:
|
env:
|
||||||
CARGO_TARGET_CACHE_NAME: "nightly"
|
CARGO_TARGET_CACHE_NAME: "nightly"
|
||||||
|
@ -13,17 +13,31 @@ _() {
|
|||||||
_ cargo build --verbose --features unstable
|
_ cargo build --verbose --features unstable
|
||||||
_ cargo test --verbose --features=unstable
|
_ cargo test --verbose --features=unstable
|
||||||
|
|
||||||
exit 0
|
maybe_cargo_install() {
|
||||||
|
for cmd in "$@"; do
|
||||||
|
set +e
|
||||||
|
cargo "$cmd" --help > /dev/null 2>&1
|
||||||
|
declare exitcode=$?
|
||||||
|
set -e
|
||||||
|
if [[ $exitcode -eq 101 ]]; then
|
||||||
|
_ cargo install cargo-"$cmd"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
# Coverage disabled (see issue #433)
|
maybe_cargo_install cov
|
||||||
_ cargo cov test
|
|
||||||
_ cargo cov report
|
|
||||||
|
|
||||||
echo --- Coverage report:
|
_ cargo cov clean
|
||||||
ls -l target/cov/report/index.html
|
_ cargo cov test --lib
|
||||||
|
|
||||||
if [[ -z "$CODECOV_TOKEN" ]]; then
|
# TODO: Fix `cargo cov report` in Docker.
|
||||||
echo CODECOV_TOKEN undefined
|
#_ cargo cov report
|
||||||
else
|
#
|
||||||
bash <(curl -s https://codecov.io/bash) -x 'llvm-cov-6.0 gcov'
|
#echo --- Coverage report:
|
||||||
fi
|
#ls -l target/cov/report/index.html
|
||||||
|
#
|
||||||
|
#if [[ -z "$CODECOV_TOKEN" ]]; then
|
||||||
|
# echo CODECOV_TOKEN undefined
|
||||||
|
#else
|
||||||
|
# bash <(curl -s https://codecov.io/bash) -x 'llvm-cov-6.0 gcov'
|
||||||
|
#fi
|
||||||
|
Reference in New Issue
Block a user