From d37ffa06c73455665ecd58b7feaa73c03e271fb9 Mon Sep 17 00:00:00 2001 From: Cecile Tonglet Date: Wed, 23 Sep 2020 14:23:02 +0200 Subject: [PATCH] Fix .travis.yml: there and back again --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index b24a647..6739db7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,8 +14,8 @@ before_script: # NOTE: will only run rustfmt and clippy if the branch is not main (and not for tags) script: - - 'if [ "$TRAVIS_BRANCH" != main ] && [ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ]; then rustfmt --check **/*.rs; fi' - - 'if [ "$TRAVIS_BRANCH" != main ] && [ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ]; then cargo clippy --all-targets --all-features -- -D warnings; fi' + - 'if [ -n "$TRAVIS_PULL_REQUEST" ]; then rustfmt --check **/*.rs; fi' + - 'if [ -n "$TRAVIS_PULL_REQUEST" ]; then cargo clippy --all-targets --all-features -- -D warnings; fi' - cargo build - cargo test - cargo doc