Install phantomjs with npm

This commit is contained in:
Rob Harrington
2016-05-16 09:23:50 +10:00
parent b9f6cb8800
commit 604418d699

View File

@@ -2,8 +2,7 @@ language: ruby
sudo: false
cache:
- bundler
- directories:
- travis-phantomjs
- $(npm bin -g)/phantomjs
bundler_args: --without development
rvm:
- "2.1.5"
@@ -30,10 +29,9 @@ before_script:
- cp config/application.yml.example config/application.yml
- RAILS_ENV=test bundle exec rake db:create db:schema:load
- mkdir -p travis-phantomjs
- wget -nc https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 -O $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 || true
- tar -xvf $PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64.tar.bz2 -C $PWD/travis-phantomjs
- export PATH=$PWD/travis-phantomjs/phantomjs-2.1.1-linux-x86_64/bin:$PATH
# Only install PhantomJS if it is not already present (ie. cached)
- npm list -g phantomjs-prebuilt@~2.1.7 --depth=0 || npm install -g phantomjs-prebuilt@~2.1.7
- export PATH=`npm bin -g`:$PATH
- >
if [ "$KARMA" = "true" ]; then