---
services:
  - redis-server
language: rust
cache: cargo

rust:
  - stable

matrix:
  include:
    - rust: stable
      env: FMT=1
      install:
      before_script:
        - rustup component add rustfmt
      script:
        - cargo fmt --all -- --check
    - rust: stable
      env: CLIPPY=1
      before_script:
        - rustup component add clippy
      script:
        - cargo clippy -- -D warnings -A clippy::single_match -A clippy::needless_pass_by_value
    - rust: stable
      env: TEST=1
      script:
        - cargo test
  allow_failures:
    - rust: stable
      env: CLIPPY=1

notifications:
  email:
    on_success: change
    on_failure: always

---
services:
  - redis-server
language: rust
cache: cargo

rust:
  - stable

matrix:
  include:
    - rust: stable
      env: FMT=1
      install:
      before_script:
        - rustup component add rustfmt
      script:
        - cargo fmt --all -- --check
    - rust: stable
      env: CLIPPY=1
      before_script:
        - rustup component add clippy
      script:
        - cargo clippy -- -D warnings
    - rust: stable
      env: TEST=1
      script:
        - cargo test
  allow_failures:
    - rust: stable
      env: CLIPPY=1

notifications:
  email:
    on_success: change
    on_failure: always

Remove fixed clippy disabled lint
Remove fixed clippy disabled lint
