forked from lidel/pls.watch
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
50 lines (49 loc) · 1.91 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
language: node_js
node_js:
- "0.12"
sudo: false
env:
global:
- DISPLAY=':99.0'
- FIREFOX_BIN='./firefox/firefox'
- BINPATH=./browsers/bin
- PATH=./node_modules/.bin:${BINPATH}:${PATH}
matrix:
- NIGHTWATCH_TARGET=phantomjs
- NIGHTWATCH_TARGET=chrome BROWSER=chrome BVER=stable
- NIGHTWATCH_TARGET=firefox BROWSER=firefox BVER=stable
matrix:
fast_finish: true
allow_failures:
- env: NIGHTWATCH_TARGET=chrome BROWSER=chrome BVER=stable
- env: NIGHTWATCH_TARGET=firefox BROWSER=firefox BVER=stable
addons:
hosts:
- yt.127.0.0.1.xip.io
apt:
packages:
- python-pip
cache:
directories:
- $HOME/node_modules/selenium-standalone/.selenium/selenium-server
install:
# devDependencies from package.json
- npm install
- npm run selenium-download
- test "$NIGHTWATCH_TARGET" = "phantomjs" || (text -x ${BINPATH}/${BROWSER}-${BVER} || ./node_modules/travis-multirunner/setup.sh )
before_script:
- npm run httpd &
# start xvfb for non-phantomjs tests
- test "$NIGHTWATCH_TARGET" = "phantomjs" || /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1920x1080x16
script:
- grunt qunit --verbose
- grunt nightwatch:${NIGHTWATCH_TARGET}
- grunt jshint
after_failure:
- ls -la test/
- ls -la test/screenshots
- bash test/upload_screenshots.sh
#- test "$NIGHTWATCH_TARGET" != "firefox" || pip install --user mozdownload
#- test "$NIGHTWATCH_TARGET" != "firefox" || $HOME/.local/bin/mozdownload -t release -v $FIREFOX_VERSION
#- test "$NIGHTWATCH_TARGET" != "firefox" || tar xf *firefox*.tar.*
#- test "$CHROME_VERSION" != "canary" || (export CHROME_REV=$(curl -s ${CHROME_URL}/LAST_CHANGE) && curl -# ${CHROME_URL}/${CHROME_REV}/chrome-linux.zip -o chrome-linux.zip && unzip chrome-linux.zip)