forked from tikv/raft-rs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
31 lines (29 loc) · 963 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
language: rust
sudo: false
env:
global:
- RUST_BACKTRACE=1
- RUSTFMT_VERSION=0.3.6
cache: cargo
# `allow_failures` requires this, but we set it below.
rust:
matrix:
allow_failures:
- rust: nightly
include:
- rust: stable
script:
- cargo test --all -- --nocapture
- cargo test --all --benches benches -- --nocapture
# rustfmt and clippy (behind the 'dev' feature) only work on the nightly toolchain.
# This build is considerably more thorough.
- rust: nightly
before_script: |
export PATH="$PATH:$HOME/.cargo/bin"
if [[ -n "`which cargo-fmt`" ]] && [[ "`cargo fmt --version`" != *"$RUSTFMT_VERSION"* ]]; then
cargo install rustfmt-nightly --version "$RUSTFMT_VERSION" --force
fi
script:
- cargo fmt -- --write-mode=diff
- cargo test --all --all-features -- --nocapture
- cargo test --all --all-features --benches benches -- --nocapture