Skip to content

Commit

Permalink
only conditionalize Travis on tree changes if the build is a PR (#7460)
Browse files Browse the repository at this point in the history
  • Loading branch information
lmtierney committed Aug 5, 2019
1 parent 12d7a93 commit 18a65f1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions scripts/travis/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,17 @@ if [[ $TOXENV == *"remote"* ]]; then
./go selenium-server-standalone
fi

# Tests will be run only when each folder, such as /py, is modified
# For PRs, tests will be run only when each folder, such as /py, is modified
if [[ ! -z $TOXENV ]]; then
if git diff --name-only HEAD~1| grep '^py/' >/dev/null; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^py/' >/dev/null; then
tox -c py/tox.ini
fi
fi

# Ordering matters here. We want rake tasks to run first
if [[ ! -z $TASK ]]; then
if [[ $TASK == //rb:* ]]; then
if git diff --name-only HEAD~1| grep '^rb/' >/dev/null; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^rb/' >/dev/null; then
./go $TASK
fi
else
Expand All @@ -24,11 +24,11 @@ fi

if [[ ! -z "$BUCK" ]]; then
if [[ $BUCK == test\ //javascript/* ]]; then
if git diff --name-only HEAD~1| grep '^javascript/' >/dev/null; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^javascript/' >/dev/null; then
./buckw $BUCK
fi
elif [[ $BUCK == test\ * ]]; then
if git diff --name-only HEAD~1| grep '^java/' >/dev/null; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^java/' >/dev/null; then
./buckw $BUCK
fi
else
Expand All @@ -37,7 +37,7 @@ if [[ ! -z "$BUCK" ]]; then
fi

if [[ ! -z "$NPM" ]]; then
if git diff --name-only HEAD~1| grep '^javascript/' >/dev/null; then
if [[ $TRAVIS_PULL_REQUEST == "false" ]] || git diff --name-only HEAD~1| grep '^javascript/' >/dev/null; then
./go node:atoms
cd javascript/node/selenium-webdriver; npm install; npm run $NPM
fi
Expand Down

0 comments on commit 18a65f1

Please sign in to comment.