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

Commit

Permalink
test(coverage): try to use codecov.io instead
Browse files Browse the repository at this point in the history
  • Loading branch information
bochaco committed Apr 11, 2019
1 parent fb8156f commit 501bfca
Showing 1 changed file with 16 additions and 11 deletions.
27 changes: 16 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ addons:
- libcurl4-openssl-dev
- libelf-dev
- libdw-dev
- binutils-dev # optional: only required for the --verify flag of coveralls
- cmake
- gcc
- binutils-dev
- libiberty-dev

matrix:
include:
Expand All @@ -35,10 +38,7 @@ 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
- PKGNAME="safe_auth" # must match with cargo.toml

before_cache:
- cargo prune
Expand All @@ -54,10 +54,15 @@ 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-*;
cmake .. && make &&
make install DESTDIR=../../kcov-build && cd ../.. &&
rm -rf kcov-master &&
for file in target/debug/$PKGNAME-*; do \
[ -x "${file}" ] || continue; \
echo "Calculating coverage of ${file}..."
mkdir -p "target/cov/$(basename $file)"; \
./kcov-build/usr/local/bin/kcov --exclude-pattern=/.cargo,/usr/lib --verify "target/cov/$(basename $file)" "$file"; \
done &&
bash <(curl -s https://codecov.io/bash) -t 6bfd35b4-f75a-4e20-b656-f2a07838976f &&
echo "Uploaded code coverage to codecov.io";
fi

0 comments on commit 501bfca

Please sign in to comment.