language: rust
sudo: false
rust:
  - stable
  - beta
  - nightly
script:
  - cargo test

sudo: false
language: rust
rust:
  - stable
  - beta
script:
  - cargo test --all
cache: cargo
matrix:
  include:
    - rust: nightly-2018-02-06
      env:
        - CLIPPY_VERSION=0.0.186
      before_script:
        - rustup component add rustfmt-preview
        - cargo install clippy --version $CLIPPY_VERSION || echo "clippy already installed"
      script:
        - cargo test --all
        - cargo fmt -- --write-mode=diff
        - cargo clippy -- -D clippy

Add rustfmt and clippy to CI matrix
Add rustfmt and clippy to CI matrix
