use cargo-tarpaulin to compute code coverage

master
Paul Woolcock 6 years ago
parent 35a603f193
commit c23559c4fd
  1. 18
      .travis.yml

@ -1,16 +1,30 @@
sudo: required
language: rust language: rust
dist: trusty
addons:
apt:
packages:
- libssl-dev
cache: cargo
rust: rust:
- stable - stable
- beta - beta
- nightly - nightly
before_script: before_script:
- bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly"* ]]; then rustup component add rustfmt-preview; fi' - |
if [[ "$TRAVIS_RUST_VERSION" == "nightly"* ]]; then rustup component add rustfmt-preview; fi
script: script:
- bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly"* ]]; then cargo fmt --all -- --check; fi' - |
if [[ "$TRAVIS_RUST_VERSION" == "nightly"* ]]; then cargo fmt --all -- --check; fi
- cargo build - cargo build
- cargo build --features toml - cargo build --features toml
- cargo build --features all - cargo build --features all
- cargo test --features all - cargo test --features all
after_success: |
if [[ "$TRAVIS_RUST_VERSION" == stable ]]; then
RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin
cargo tarpaulin --ciserver travis-ci --coveralls $TRAVIS_JOB_ID
fi
matrix: matrix:
allow_failures: allow_failures:
- rust: nightly - rust: nightly

Loading…
Cancel
Save