From 05f246e48c5e6e59aee85f1ce91fe84a3ad4634c Mon Sep 17 00:00:00 2001 From: Reuben Morais Date: Tue, 26 May 2020 10:15:02 +0200 Subject: [PATCH] Make sure Travis can handle PR w/ non-master base X-DeepSpeech: NOBUILD --- .travis.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e1bf2f40..ca33852f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,11 +12,14 @@ jobs: - name: cardboard linter install: - pip install --upgrade cardboardlint pylint - script: + script: | # Run cardboardlinter, in case of pull requests - - if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then - cardboardlinter --refspec $TRAVIS_BRANCH -n auto; + if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then + if [ "$TRAVIS_BRANCH" != "master" ]; then + git fetch origin $TRAVIS_BRANCH:$TRAVIS_BRANCH fi + cardboardlinter --refspec $TRAVIS_BRANCH -n auto; + fi - name: python unit tests install: - pip install --upgrade -r requirements_tests.txt;