language: rust
cache: cargo
dist: trusty
sudo: true
before_cache:
- cargo prune
- |
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then
cargo install cargo-tarpaulin
fi
before_script:
- |
(which cargo-install-update && cargo install-update cargo-update) || cargo install cargo-update &&
(which cargo-prune && cargo install-update cargo-prune) || cargo install cargo-prune
os:
- linux
rust:
- nightly
script:
- cargo clean
- cargo build
- cargo test
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == nightly ]]; then
cargo tarpaulin -v --out Xml
bash <(curl -s https://codecov.io/bash)
fi