Skip to content
This repository has been archived by the owner on Jan 7, 2020. It is now read-only.

Commit

Permalink
test(coverage): get test coverage report using kcov and add badge to …
Browse files Browse the repository at this point in the history
…readme
  • Loading branch information
bochaco committed Apr 11, 2019
1 parent 21781d1 commit c616f34
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 7 deletions.
35 changes: 31 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,16 @@ env:
language: rust
rust:
- 1.32.0

# necessary for `travis-cargo coveralls --no-sudo`
addons:
apt:
packages:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev # optional: only required for the --verify flag of coveralls

os:
- linux
- osx
Expand All @@ -22,12 +32,29 @@ cache:
before_script:
- curl -sSL https://github.com/maidsafe/QA/raw/master/travis/cargo_install.sh > cargo_install.sh
- bash cargo_install.sh cargo-prune;
- |
PKGNAME="safe_auth" # must match with cargo.toml
LOCAL="~/.local" # install here to avoid `sudo`
export PATH=$LOCAL/bin:$PATH
before_cache:
- cargo prune

install :
- cargo check --release
install:
- cargo check

script:
- cargo test

script :
- cargo test --release
after_success:
- |
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
wget https://github.com/SimonKagstrom/kcov/archive/master.tar.gz &&
tar xzf master.tar.gz && mkdir kcov-master/build && cd kcov-master/build &&
cmake -DCMAKE_INSTALL_PREFIX:PATH=$LOCAL .. && make &&
make install && cd ../.. &&
kcov --verify \
--coveralls-id=$TRAVIS_JOB_ID \
--exclude-pattern=/.cargo \
target/kcov target/debug/$PKGNAME-*;
fi
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
|Documentation|Linux/macOS/Windows|
|:-----------:|:-----------------:|
| [![Documentation](https://docs.rs/safe-authenticator-cli/badge.svg)](https://docs.rs/safe-authenticator-cli) | [![Build Status](https://travis-ci.com/maidsafe/safe-authenticator-cli.svg?branch=master)](https://travis-ci.com/maidsafe/safe-authenticator-cli) |
|Documentation|Linux/macOS/Windows|Coverage Status|
|:-----------:|:-----------------:|:-------------:|
| [![Documentation](https://docs.rs/safe-authenticator-cli/badge.svg)](https://docs.rs/safe-authenticator-cli) | [![Build Status](https://travis-ci.com/maidsafe/safe-authenticator-cli.svg?branch=master)](https://travis-ci.com/maidsafe/safe-authenticator-cli) | [![Coverage Status](https://coveralls.io/repos/github/maidsafe/safe-authenticator-cli/badge.svg)](https://coveralls.io/github/maidsafe/safe-authenticator-cli) |

| [MaidSafe website](https://maidsafe.net) | [SAFE Dev Forum](https://forum.safedev.org) | [SAFE Network Forum](https://safenetforum.org) |
|:----------------------------------------:|:-------------------------------------------:|:----------------------------------------------:|


# SAFE Authenticator CLI
This crate implements a CLI (Command Line Interface) for the [safe_authenticator](https://github.com/maidsafe/safe_client_libs/tree/master/safe_authenticator) crate.

Expand Down

0 comments on commit c616f34

Please sign in to comment.