From 4c3561af3eb033cf2a347af2277b01ced35cda2e Mon Sep 17 00:00:00 2001 From: Haralan Dobrev Date: Fri, 25 Aug 2017 01:58:28 +0300 Subject: [PATCH] Install PhantomJS 2.1.1 on Travis CI if not available --- .travis.yml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 36971f8..7a7f847 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,13 +30,23 @@ branches: cache: directories: - $HOME/.composer/cache + - $HOME/travis_phantomjs notifications: email: false slack: secure: ixWu6kWtNIlzzdImpu4MdvGYpA6ZPp/dQpMAp6FDO2oHHB55J9ossBYtVtBXPCDs9OxqfQl2yqbE+TkhfIfkZqIbhvX2+CiIomvYSKZDvryUlCfbfV29behmSVIVYvg3b8Tba+nAyZeJA2guUyAy02WGr3n4I+PDgZC3Wa/mv94= -before_install: travis_retry composer selfupdate +before_install: + - travis_retry composer selfupdate + + - phantomjs --version + - export PATH=$HOME/travis_phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH + - phantomjs --version + - if [ $(phantomjs --version) != '2.1.1' ]; then rm -rf $HOME/travis_phantomjs; mkdir -p $HOME/travis_phantomjs; fi + - if [ $(phantomjs --version) != '2.1.1' ]; then travis_retry wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $HOME/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2; fi + - if [ $(phantomjs --version) != '2.1.1' ]; then tar -xvf $HOME/travis_phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $HOME/travis_phantomjs; fi + - phantomjs --version install: - if [ "$DEPS" = "normal" ]; then travis_retry composer install --no-interaction; fi;