notifications:
  email: false
language: rust
rust:
  - stable
  - beta
  - nightly
cache: cargo
matrix:
  allow_failures:
    - rust
      - stable
      - nightly
before_script:
  - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then
      cargo install clippy --force;
    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
