diff --git a/.travis.yml b/.travis.yml index 866c3ae..22d3169 100644 --- a/.travis.yml +++ b/.travis.yml @@ -19,6 +19,19 @@ mysql: username: root encoding: utf8 +before_install: + - cd .. + # 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" + - cd - + 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 +83,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