language: rust
sudo: false
env:
global:
- RUST_BACKTRACE=1
- RUSTFLAGS="-D warnings"
cache: cargo
rust:
matrix:
include:
# This build uses stable and checks rustfmt (clippy is not on stable).
- rust: stable
install:
- rustup component add rustfmt-preview
before_script:
- cargo fmt --all -- --check
- rust: nightly
install:
- rustup component add clippy-preview --toolchain nightly
before_script:
- cargo clippy --all -- -D clippy::all
script:
- cargo test --all -- --nocapture
# Validate benches still work.
- cargo bench --all -- --test
# Because failpoints inject failure in code path, which will affect all concurrently running tests, Hence they need to be synchronized, which make tests slow.
- cargo test --tests --features failpoint -- --nocapture