From cf9d56e9bf3bc5c3b91e21bd5ef416acf0639f46 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Fri, 16 Oct 2015 18:22:23 +0900 Subject: [PATCH] Add priv/test-for-gh-pr.sh, change TravisCI 'script' to use it --- .travis.yml | 2 +- priv/test-for-gh-pr.sh | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) create mode 100755 priv/test-for-gh-pr.sh diff --git a/.travis.yml b/.travis.yml index 40363cb..7bb3465 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,6 +1,6 @@ language: erlang notifications: email: scott@basho.com -script: "make test" +script: "priv/test-for-gh-pr.sh" otp_release: - 17.5 diff --git a/priv/test-for-gh-pr.sh b/priv/test-for-gh-pr.sh new file mode 100755 index 0000000..868cf04 --- /dev/null +++ b/priv/test-for-gh-pr.sh @@ -0,0 +1,10 @@ +#!/bin/sh + +set -x + +if [ "${TRAVIS_PULL_REQUEST}" = "false" ] then + echo '$TRAVIS_PULL_REQUEST is false, skipping tests' + exit 0 +else + make test +fi