From 6ceeb4373367c80a6c747193f4b35a16ea1b5b92 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 | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 866c3ae..83c35b4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -70,10 +70,27 @@ before_script: # Export web server URL for browser tests. - export SIMPLETEST_BASE_URL=http://localhost:8888 + # Browser output. + - export BROWSERTEST_OUTPUT_DIRECTORY="/tmp" + + # Upgrade PhantomJS to 2.x. + # @see https://github.com/travis-ci/travis-ci/issues/3225 + # @see https://github.com/testdouble/present/commit/461ac72cdcfc4e87d84711550a638fbc12154567 + # @see https://github.com/drupalcommerce/commerce/blob/8.x-2.x/.travis.yml + - export PHANTOMJS_VERSION=2.1.1 + - mkdir travis-phantomjs + - 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 + - tar -xvf $PWD/travis-phantomjs/phantomjs-$PHANTOMJS_VERSION-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs + - export PATH=$PWD/travis-phantomjs:$PATH + - phantomjs --version + + # Start PhantomJS + - phantomjs --debug=true --ssl-protocol=any --ignore-ssl-errors=true ./vendor/jcalderonzumba/gastonjs/src/Client/main.js 8510 1024 768 & + script: # Coding standards. - $HOME/.composer/vendor/bin/phpcs --report=full --standard=Drupal $TESTDIR # Run the PHPUnit tests which also include the kernel tests. - - ./vendor/phpunit/phpunit/phpunit -c ./core/phpunit.xml.dist ./modules/$MODULE_NAME + - ./vendor/phpunit/phpunit/phpunit -c ./core/phpunit.xml.dist ./modules/$MODULE_NAME -vvv # Run legacy simpletests. - php core/scripts/run-tests.sh --color --verbose --php `which php` --directory modules/$MODULE_NAME/src/Tests --dburl $SIMPLETEST_DB --url $SIMPLETEST_BASE_URL --sqlite ./.db.sqlite