CI: Check Rust formatting for each commit (#909)

This commit is contained in:
lzutao 2019-05-09 02:20:38 +07:00 committed by Dylan DPC
parent 506996808b
commit 9194a40acd
1 changed files with 5 additions and 0 deletions

View File

@ -44,6 +44,11 @@ before_install:
script:
- cargo test --all
- cargo test --all --no-default-features
- if [ "$TARGET" = x86_64-unknown-linux-gnu ] && [ "$TRAVIS_RUST_VERSION" = stable ]; then
rustup component add rustfmt;
rustfmt -vV;
cargo fmt --all -- --check;
fi
before_deploy:
- sh ci/before_deploy.sh