diff --git a/.travis.yml b/.travis.yml index 6f04160..c518abc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 @@ -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 diff --git a/README.md b/README.md index e0c4e21..6efd744 100644 --- a/README.md +++ b/README.md @@ -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.