From cf9d56e9bf3bc5c3b91e21bd5ef416acf0639f46 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Fri, 16 Oct 2015 18:22:23 +0900 Subject: [PATCH 1/3] 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 From 5f953bc5ddc76ccc9c720d3316fb034915cad4cb Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Fri, 16 Oct 2015 18:25:23 +0900 Subject: [PATCH 2/3] Grr, comma --- priv/test-for-gh-pr.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/test-for-gh-pr.sh b/priv/test-for-gh-pr.sh index 868cf04..fd9c4f2 100755 --- a/priv/test-for-gh-pr.sh +++ b/priv/test-for-gh-pr.sh @@ -2,7 +2,7 @@ set -x -if [ "${TRAVIS_PULL_REQUEST}" = "false" ] then +if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then echo '$TRAVIS_PULL_REQUEST is false, skipping tests' exit 0 else From ae7eba9dcf7adb15254ccec83eb97bf6a5260770 Mon Sep 17 00:00:00 2001 From: Scott Lystig Fritchie Date: Fri, 16 Oct 2015 18:30:46 +0900 Subject: [PATCH 3/3] Excuse to re-push --- priv/test-for-gh-pr.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/priv/test-for-gh-pr.sh b/priv/test-for-gh-pr.sh index fd9c4f2..55f8a8d 100755 --- a/priv/test-for-gh-pr.sh +++ b/priv/test-for-gh-pr.sh @@ -1,10 +1,9 @@ #!/bin/sh -set -x - if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then echo '$TRAVIS_PULL_REQUEST is false, skipping tests' exit 0 else + echo '$TRAVIS_PULL_REQUEST is not false, running tests' make test fi