From 95572fb314d4580589c8d18e13cd6b72238238a0 Mon Sep 17 00:00:00 2001 From: Gregg Van Hove and Tim Jarratt Date: Thu, 3 Oct 2013 11:24:57 -0700 Subject: [PATCH 1/2] Don't try to use SauceLabs on pull request builds --- travis-core-script.sh | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/travis-core-script.sh b/travis-core-script.sh index f01656a7..8bf4bb12 100644 --- a/travis-core-script.sh +++ b/travis-core-script.sh @@ -1,12 +1,21 @@ #!/bin/bash -e -export DISPLAY=:99.0 - -/etc/init.d/xvfb start - if [ $USE_SAUCE == true ] then + if [ $TRAVIS_SECURE_ENV_VARS == true ] + then curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash + else + if [ $JASMINE_BROWSER == firefox ] + then + export USE_SAUCE=false + export DISPLAY=:99.0 + /etc/init.d/xvfb start + else + echo "skipping tests since we can't use sauce" + exit 0 + fi + fi fi bundle exec rake jasmine:ci From 520a8c85a25a5ba0184f788d58e960e78352d7f4 Mon Sep 17 00:00:00 2001 From: Tim Jarratt Date: Thu, 3 Oct 2013 12:07:57 -0700 Subject: [PATCH 2/2] Don't bother trying to still use firefox --- travis-core-script.sh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/travis-core-script.sh b/travis-core-script.sh index 8bf4bb12..78656333 100644 --- a/travis-core-script.sh +++ b/travis-core-script.sh @@ -6,15 +6,8 @@ then then curl https://gist.github.com/santiycr/5139565/raw/sauce_connect_setup.sh | bash else - if [ $JASMINE_BROWSER == firefox ] - then - export USE_SAUCE=false - export DISPLAY=:99.0 - /etc/init.d/xvfb start - else - echo "skipping tests since we can't use sauce" - exit 0 - fi + echo "skipping tests since we can't use sauce" + exit 0 fi fi