Skip to content

Commit

Permalink
optimize travis config
Browse files Browse the repository at this point in the history
  • Loading branch information
smcatala committed Aug 19, 2018
1 parent 5e9a211 commit 4cef069
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions .travis.yml
@@ -1,20 +1,32 @@
dist: trusty
sudo: required
sudo: false

addons:
firefox: "latest"
apt:
sources:
- google-chrome
packages:
- google-chrome-stable

language: node_js
node_js:
- "6.14"
- "8.11"
addons:
firefox: "latest"
cache:
directories: node_modules

branches:
only: master

before_install:
- if [[ `npm -v` != 6* ]]; then npm i -g npm@6; fi
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
- sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
- sudo apt-get update
- sudo apt-get install -y google-chrome-stable

before_script:
- export CHROME_BIN=google-chrome
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- "export CHROME_BIN=$(which google-chrome)"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- sleep 3 # https://docs.travis-ci.com/user/gui-and-headless-browsers/#Using-xvfb-to-Run-Tests-That-Require-a-GUI

script: npm run test:ci
after_script: npm run test:ci:coveralls

after_script: npm run test:ci:coveralls

0 comments on commit 4cef069

Please sign in to comment.