This repository has been archived by the owner on Apr 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
/
.travis.yml
99 lines (88 loc) · 2.97 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#
# https://docs.travis-ci.com/user/reference/trusty/#Image-differences-from-Precise
#
dist: trusty
sudo: required
language: javascript
addons:
firefox: "latest"
before_install:
- "uname -a"
- "gcc --version"
- "lsb_release -a"
- "npm version"
- "nvm install v6.11.2"
- "nvm use v6.11.2"
- "npm version"
- "npm install -g npm@latest"
- "npm version"
- "#disabledForNow# phantomjs --version"
- "sudo apt-get update -q"
- "sudo apt-get install build-essential chrpath libssl-dev libxft-dev -y"
- "sudo apt-get install libfreetype6 libfreetype6-dev -y"
- "sudo apt-get install libfontconfig1 libfontconfig1-dev -y"
- "pushd ~"
- "echo $PATH"
- "#disabledForNow# export PHANTOM_JS=\"phantomjs-2.1.1-linux-x86_64\""
- "#disabledForNow# wget https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOM_JS}.tar.bz2"
- "#disabledForNow# sudo tar xvjf ${PHANTOM_JS}.tar.bz2"
- "#disabledForNow# which phantomjs"
- "#disabledForNow# ls -R /usr/local/phantomjs/"
- "#disabledForNow# sudo mv /usr/local/phantomjs /usr/local/phantomjs_old"
- "#disabledForNow# sudo mv ${PHANTOM_JS} /usr/local/phantomjs"
- "#disabledForNow# sudo ln -sf /usr/local/phantomjs/bin/phantomjs /usr/local/bin"
- "#disabledForNow# sudo ln -sf /usr/local/phantomjs/bin/phantomjs /usr/local/phantomjs/phantomjs"
- "#disabledForNow# /usr/local/phantomjs/phantomjs --version"
- "#disabledForNow# /usr/local/bin/phantomjs --version"
- "#disabledForNow# phantomjs --version"
- "#disabledForNow# which phantomjs"
- "wget https://github.com/mozilla/geckodriver/releases/download/v0.19.0/geckodriver-v0.19.0-linux64.tar.gz"
- "tar -xvzf geckodriver-v0.19.0-linux64.tar.gz"
- "chmod +x geckodriver"
- "sudo mv geckodriver /usr/local/bin/"
- "firefox -v"
- "popd"
- "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"
# command to install dependencies
install:
- "rm -rf node_modules/"
- "./install.sh"
- "NODE_ENV=production npm run wbs-webpack-build-prod"
- "ls -lhS dist/"
- "sudo pip install selenium"
- "sudo pip install --upgrade selenium"
- "sudo pip install behave"
- "sudo pip install jsonpath-rw"
before_script:
- "export DISPLAY=:99.0"
- "ls -lhS dist/"
- "USE_LOG_FETCH=1 npm run startbeta &"
- "sleep 20"
after_success:
- "cat ./webdriver.log"
- "cat ../../start-server.log"
after_failure:
- "cat ./webdriver.log"
- "cat ../../start-server.log"
# command to run tests
script:
- "ps auwx|grep webapp_launcher.js"
- "USE_LOG_FETCH=1 make test"
- "pushd tests/behave"
- "# Testing with Firefox"
- "firefox -v"
- "TARGET=http://localhost:8080 behave --no-capture"
- "# Testing with PhantomJS"
- "# phantomjs -v"
- "# TARGET=http://localhost:8080 BROWSER=phantomjs behave --no-capture"
- "popd"
# whitelist
branches:
only:
- master
- production
- stage
notifications:
email: