From bb639d5fe382659898a8ec09fe35175d70ea30c5 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Mon, 2 Sep 2019 18:20:15 +0900 Subject: [PATCH] Prevent jobs from being terminated on Travis (#167) * Prevent jobs from being terminated * Fix installing clippy * Fix command * Run Clippy on nightly --- .travis.yml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 25f7f0ee..f3e3603a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,8 +3,13 @@ sudo: false dist: trusty cache: - cargo: true apt: true + directories: + - $HOME/.cargo + - $HOME/.rustup + +before_cache: + - rm -rf $HOME/.cargo/registry matrix: include: @@ -28,9 +33,13 @@ before_install: before_script: - | if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then - ( ( cargo install clippy && export CLIPPY=true ) || export CLIPPY=false ); + rustup component add clippy --toolchain=nightly fi - export PATH=$PATH:~/.cargo/bin script: - cargo check --all + - | + if [[ "$TRAVIS_RUST_VERSION" == "nightly" ]]; then + cargo clippy + fi