Skip to content

Commit

Permalink
Set up code coverage monitoring with codecov.io.
Browse files Browse the repository at this point in the history
  • Loading branch information
pkgw committed Jan 23, 2018
1 parent 00b8d8a commit bbf5b58
Showing 1 changed file with 27 additions and 3 deletions.
30 changes: 27 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ matrix:
- os: linux
dist: xenial
rust: stable
env: RUSTFLAGS="-C link-dead-code"
- os: linux
dist: xenial
rust: beta
Expand All @@ -31,15 +32,27 @@ addons:
- libharfbuzz-dev
- libfontconfig1-dev
- libicu-dev
- zlib1g-dev
- libssl-dev
- openssl
- zlib1g-dev

# At the moment, Travis' Xenial images have an auto-update daemon that can
# lock the apt/dpkg system under us. See
# https://github.com/travis-ci/travis-cookbooks/issues/952 and
# https://unix.stackexchange.com/questions/315502/how-to-disable-apt-daily-service-on-ubuntu-cloud-vm-image
# . We adopt the solution from the StackExchange post.

before_install:
- |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
else
sudo add-apt-repository -y ppa:k-peter/tectonic-ci
sudo systemctl stop apt-daily.service &&
sudo systemctl kill --kill-who=all apt-daily.service &&
while ! (systemctl list-units --all apt-daily.service | fgrep -q dead) ; do
sleep 1
done &&
sudo add-apt-repository -y ppa:k-peter/tectonic-ci &&
sudo apt-get update
fi
Expand All @@ -50,7 +63,7 @@ install:
brew install harfbuzz --with-graphite2 &&
brew install --force openssl
else
sudo apt-get upgrade -y libharfbuzz-dev
sudo apt-get install -y libharfbuzz-dev
fi
before_script:
Expand All @@ -67,6 +80,17 @@ script:
cargo build --verbose &&
cargo test
after_success: |
if [[ "$TRAVIS_OS_NAME" == "linux" && "$TRAVIS_RUST_VERSION" == "stable" ]]; then
sudo apt-get install -y kcov &&
cargo install cargo-kcov &&
for test in formats tex-outputs trip ; do
cargo kcov -v --no-clean-rebuild --test $test -- --verify --include-path=$(pwd)
done &&
bash <(curl -s https://codecov.io/bash) &&
echo "Uploaded code coverage"
fi
before_deploy:
- openssl aes-256-cbc -K $encrypted_bc40b17e21fa_key -iv $encrypted_bc40b17e21fa_iv
-in dist/deploy_key.enc -out /tmp/deploy_key -d
Expand Down

0 comments on commit bbf5b58

Please sign in to comment.