Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
24 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |