notifications:
  email: false
language: rust
rust:
  - stable
  - beta
  - nightly
cache: cargo
matrix:
  allow_failures:
    - rust: nightly
before_script:
  - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
      rustup component add clippy;
    fi'
script:
  - RUSTFLAGS="-D warnings" cargo build --verbose
  - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
      cargo clippy --all -- -D warnings;
    fi'
  - cargo test --verbose
