diff --git a/.travis.yml b/.travis.yml index 6a52a861..8babf544 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,6 +5,8 @@ rust: cache: cargo +before_script: (cargo install rustfmt || true) + sudo: false notifications: diff --git a/scripts/travis-build.sh b/scripts/travis-build.sh index 1135ed96..cfa528ad 100644 --- a/scripts/travis-build.sh +++ b/scripts/travis-build.sh @@ -5,6 +5,10 @@ set -e # build rust project make +# check formatting (rustfmt) +PATH=~/.cargo/bin:$PATH +cargo fmt -- --write-mode=diff + # clone hugo branch, which contains the blog template git clone --branch=hugo https://github.com/phil-opp/blog_os.git hugo cd hugo