Skip to content

Commit

Permalink
Always fetch PR target branch before running tests
Browse files Browse the repository at this point in the history
  • Loading branch information
reuben committed Jul 19, 2019
1 parent e3f8417 commit a9c4b7c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .travis/script
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#!/bin/bash
set -ex

git remote set-branches --add origin $TRAVIS_BRANCH
git fetch

if [[ ( "$TRAVIS_PULL_REQUEST" != "false" ) && ( "$TEST_SUITE" == "lint" ) ]]; then
# Run cardboardlinter, in case of pull requests
cardboardlinter --refspec $TRAVIS_BRANCH -n auto
cardboardlinter --refspec origin/$TRAVIS_BRANCH -n auto
fi

if [[ "$TEST_SUITE" == "unittest" ]]; then
Expand Down

0 comments on commit a9c4b7c

Please sign in to comment.