From 3727e1760722292f8cc2a2e8d4d4a39e06c7ad6d Mon Sep 17 00:00:00 2001 From: Jonathan Hedstrom Date: Thu, 10 Nov 2016 14:03:56 -0800 Subject: [PATCH] Upgrade PhantomJS to 2.x on Travis - Fixes #60 --- .travis.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.travis.yml b/.travis.yml index 866c3ae..3f11f3d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,17 @@ mysql: username: root encoding: utf8 +before_install: + # Upgrade PhantomJS to 2.x. + # @see https://github.com/travis-ci/travis-ci/issues/3225 + # @see https://github.com/testdouble/present/commit/461ac72cdcfc4e87d84711550a638fbc12154567 + - "export PHANTOMJS_VERSION=2.1.1" + - "export PATH=$PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64/bin:$PATH" + - "if [ $(phantomjs --version) != '$PHANTOMJS_VERSION' ]; then rm -rf $PWD/travis_phantomjs; mkdir -p $PWD/travis_phantomjs; fi" + - "if [ $(phantomjs --version) != '$PHANTOMJS_VERSION' ]; then wget https://github.com/Medium/phantomjs/releases/download/v$PHANTOMJS_VERSION/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -O $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2; fi" + - "if [ $(phantomjs --version) != '$PHANTOMJS_VERSION' ]; then tar -xvf $PWD/travis_phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis_phantomjs; fi" + - "phantomjs --version" + before_script: # Remove Xdebug as we don't need it and it causes "PHP Fatal error: Maximum # function nesting level of '256' reached." @@ -70,6 +81,9 @@ before_script: # Export web server URL for browser tests. - export SIMPLETEST_BASE_URL=http://localhost:8888 + # Start PhantomJS + - phantomjs --ssl-protocol=any --ignore-ssl-errors=true ./vendor/jcalderonzumba/gastonjs/src/Client/main.js 8510 1024 768 2>&1 >> /dev/null & + script: # Coding standards. - $HOME/.composer/vendor/bin/phpcs --report=full --standard=Drupal $TESTDIR