language: rust

sudo: false
os:
  - linux
  - osx
rust:
  - stable
  - nightly

matrix:
  fast_finish: true

branches:
  only:
    - master

script:
  - cargo build --verbose
  - cargo test --verbose

after_script: |
  if [ "$TRAVIS_OS_NAME" = linux -a "$TRAVIS_RUST_VERSION" = nightly ]; then
    bash <(curl https://raw.githubusercontent.com/xd009642/tarpaulin/master/travis-install.sh)
    cargo tarpaulin --out Xml
    bash <(curl -s https://codecov.io/bash)
  fi

language: rust

sudo: false
os:
  - linux
  - osx
rust:
  - stable
  - nightly

matrix:
  fast_finish: true

branches:
  only:
    - master

cache: cargo

before_cache: |
  if [[ "$TRAVIS_RUST_VERSION" = nightly ]]; then
    RUSTFLAGS="--cfg procmacro2_semver_exempt" cargo install cargo-tarpaulin -f
  fi

script:
  - cargo build --verbose
  - cargo test --verbose

after_script: |
  if [[ "$TRAVIS_OS_NAME" = linux && "$TRAVIS_RUST_VERSION" = nightly ]]; then
    cargo tarpaulin --out Xml
    bash <(curl -s https://codecov.io/bash)
  fi

Stop using the shell script as it's no longer recommended
Stop using the shell script as it's no longer recommended
