From 8aa4e65856227a507a612283200271a376db8f1c Mon Sep 17 00:00:00 2001 From: Victor Berger Date: Sat, 11 Mar 2017 09:06:25 +0100 Subject: [PATCH] travis: Add rustfmt --- .travis.yml | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index c184699..5cd9bf7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -24,17 +24,16 @@ branches: - master before_script: - - | - pip install 'travis-cargo<0.2' --user && - export PATH=$HOME/.local/bin:$PATH - - | - mkdir $(pwd)/socket && - export XDG_RUNTIME_DIR="$(pwd)/socket" + - which rustfmt || cargo install rustfmt + - pip install 'travis-cargo<0.2' --user + - export PATH=$HOME/.local/bin:$HOME/.cargo/bin:$PATH + - mkdir $(pwd)/socket + - export XDG_RUNTIME_DIR="$(pwd)/socket" script: - - | - travis-cargo build && - travis-cargo --only stable doc -- --no-deps + - cargo fmt -- --write-mode=diff + - travis-cargo build + - travis-cargo --only stable doc -- --no-deps after_success: - travis-cargo --only stable doc-upload