---
services:
  - redis-server

language: rust
cache: cargo

rust:
  - nightly
  - stable

matrix:
  include:
    - rust: nightly
      env: FMT=1
      install:
        - which cargo-install-update || cargo install cargo-update
        - cargo install-update -i rustfmt-nightly
      script: cargo fmt -- --check
    - rust: nightly
      env: CLIPPY=1
      script:
        - rustup component add clippy-preview
        - cargo clippy -- -D warnings
  allow_failures:
    - rust: nightly
      env: CLIPPY=1

notifications:
  email:
    on_success: change
    on_failure: always

---
services:
  - redis-server

language: rust
cache: cargo

rust:
  - nightly
  - stable

matrix:
  include:
    - rust: nightly
      env: FMT=1
      install:
        - which cargo-install-update || cargo install cargo-update
        - cargo install-update -i rustfmt-nightly
      script: cargo fmt -- --check
    - rust: stable
      env: CLIPPY=1
      script:
        - rustup component add clippy-preview
        - cargo clippy -- -D warnings
  allow_failures:
    - rust: stable
      env: CLIPPY=1

notifications:
  email:
    on_success: change
    on_failure: always

Use rust stable channel for clippy
Use rust stable channel for clippy
