language: rust
cache: cargo
rust: '1.31.0'
stages:
- formatting
- test
- lint
jobs:
include:
- name: check rustfmt
stage: formatting
rust: stable
os: linux
before_script: rustup component add rustfmt
script: cargo fmt -- --check
- stage: test
os: linux
before_script: 'sudo hostname hostname-for-testing'
script:
- cargo test --verbose
- cargo test --verbose -- --ignored
- stage: test
os: osx
before_script: 'sudo hostname hostname-for-testing'
script:
- cargo test --verbose
- cargo test --verbose -- --ignored
- stage: test
os: windows
before_script: ''
script: cargo test --verbose
- stage: test
os: linux
rust: beta
script: cargo test --verbose
- stage: test
os: linux
rust: nightly
script: cargo test --verbose
- stage: lint
os: linux
rust: stable
before_script: rustup component add clippy
script: cargo clippy --all-targets
- stage: lint
os: windows
rust: stable
before_script: rustup component add clippy
script: cargo clippy --all-targets