Fix travis tests

This commit is contained in:
Dan Seripap 2016-07-04 23:12:20 -04:00
parent c5b1126dc8
commit ff4401aeac
2 changed files with 16 additions and 4 deletions

View File

@ -1,10 +1,18 @@
sudo: required
dist: trusty
language: node_js language: node_js
node_js: node_js:
- 5.2.0 - 5.2.0
sudo: required
cache: cache:
directories: directories:
- node_modules - node_modules
addons:
apt:
sources:
- google-chrome
packages:
- google-chrome-stable
- google-chrome-beta
before_install: before_install:
- sudo apt-get update - sudo apt-get update
- sudo apt-get install -y libappindicator1 fonts-liberation - sudo apt-get install -y libappindicator1 fonts-liberation
@ -12,12 +20,11 @@ before_install:
- sudo dpkg -i google-chrome*.deb - sudo dpkg -i google-chrome*.deb
- wget http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip - wget http://chromedriver.storage.googleapis.com/2.21/chromedriver_linux64.zip
- unzip chromedriver_linux64 - unzip chromedriver_linux64
- sudo mv chromedriver /usr/bin - sudo mv chromedriver /usr/bin
before_script: before_script:
- export CHROME_BIN=/usr/bin/google-chrome - export CHROME_BIN=/usr/bin/google-chrome
- "export DISPLAY=:99.0" - "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start" - "sh -e /etc/init.d/xvfb start"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
- sleep 5 # give xvfb some time to start - sleep 5 # give xvfb some time to start
- gulp bundle - gulp bundle
- npm start & - npm start &

View File

@ -49,7 +49,12 @@ module.exports = function(config) {
// start these browsers // start these browsers
// available browser launchers: https://npmjs.org/browse/keyword/karma-launcher // available browser launchers: https://npmjs.org/browse/keyword/karma-launcher
browsers: ['Chrome'], browsers: ['Chrome'],
customLaunchers: {
Chrome_without_sandbox: {
base: 'Chrome',
flags: ['--no-sandbox'] // with sandbox it fails under Docker
}
},
// Continuous Integration mode // Continuous Integration mode
// if true, Karma captures browsers, runs the tests and exits // if true, Karma captures browsers, runs the tests and exits
singleRun: false, singleRun: false,