version: 2
jobs:
build:
docker:
- image: rust:1
steps:
- checkout
- run:
name: Setup environment
command: |
rustup toolchain install nightly-2019-09-05
rustup default nightly-2019-09-05
rustup component add rustfmt
rustup component add clippy
rustup update
- run:
name: Linter
command: |
cargo fmt --all -- --check
cargo clippy -- -D warnings
- run:
name: Build
command: cargo build
- run:
name: Unit tests
command: cargo test