---
kind: pipeline
type: docker
name: test elseware 

concurrency:
    limit: 1

steps:
- name: build
  image: rustlang/rust:nightly
  volumes:
  - name: cache
    path: /usr/local/cargo
  - name: target-cache
    path: /drone/src/target
  commands:
  - cargo build
- name: clippy!
  image: rustlang/rust:nightly
  volumes:
  - name: cache
    path: /usr/local/cargo
  - name: target-cache
    path: /drone/src/target
  commands:
  - cargo clippy -- --deny warnings
- name: test
  image: rustlang/rust:nightly
  volumes:
  - name: cache
    path: /usr/local/cargo
  - name: target-cache
    path: /drone/src/target
  commands:
  - cargo test

volumes:
- name: cache
  host:
    path: /home/drone/.cargo
- name: target-cache
  host:
    path: /home/drone/cargo-cache