Add code coverage analysis (#191)
* test * test * test * test * test * test * test * test * test * test * test * weird fmt error * test * test * test * test * test * test * test * test * test
This commit is contained in:
parent
083b2b2228
commit
7049756e37
2 changed files with 19 additions and 0 deletions
|
@ -30,6 +30,9 @@ jobs:
|
|||
- run:
|
||||
name: Run integration tests
|
||||
command: WITH_LIBSNARK=1 LIBSNARK_SOURCE_PATH=$HOME/libsnark RUSTFLAGS="-D warnings" cargo test --release -- --ignored
|
||||
- run:
|
||||
name: Generate code coverage report
|
||||
command: ./scripts/cov.sh
|
||||
- save_cache:
|
||||
paths:
|
||||
- /usr/local/cargo/registry
|
||||
|
|
16
scripts/cov.sh
Executable file
16
scripts/cov.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Exit if any subcommand fails
|
||||
set -e
|
||||
|
||||
apt-get update
|
||||
apt-get install -qq curl zlib1g-dev build-essential python
|
||||
apt-get install -qq cmake g++ pkg-config jq
|
||||
apt-get install -qq libcurl4-openssl-dev libelf-dev libdw-dev binutils-dev libiberty-dev
|
||||
cargo install cargo-kcov
|
||||
cargo kcov --print-install-kcov-sh | sh
|
||||
cd zokrates_fs_resolver && WITH_LIBSNARK=1 LIBSNARK_SOURCE_PATH=$HOME/libsnark cargo kcov && cd ..
|
||||
cd zokrates_core && WITH_LIBSNARK=1 LIBSNARK_SOURCE_PATH=$HOME/libsnark cargo kcov && cd ..
|
||||
cd zokrates_cli && WITH_LIBSNARK=1 LIBSNARK_SOURCE_PATH=$HOME/libsnark cargo kcov && cd ..
|
||||
bash <(curl -s https://codecov.io/bash)
|
||||
echo "Uploaded code coverage"
|
Loading…
Reference in a new issue