forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (51 loc) · 2.06 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
language: java
sudo: false
notifications:
email: false
irc:
channels:
- "chat.freenode.org#selenium"
on_success: never
on_failure: always
use_notice: true
skip_join: true
before_script:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
script:
- export CHROME_REVISION=`curl -s http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/LAST_CHANGE`
- export CHROMEDRIVER_VERSION=`curl -s http://chromedriver.storage.googleapis.com/LATEST_RELEASE`
- curl -L -O "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/${CHROME_REVISION}/chrome-linux.zip"
- unzip chrome-linux.zip
- curl -L -O "http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
- unzip chromedriver_linux64.zip
- chmod +x chromedriver
- mv chromedriver chrome-linux/chromedriver
- export PATH=$PATH:$PWD/chrome-linux
- export CHROME_BINARY=$PWD/chrome-linux/chrome
- export CHROMEDRIVER=$PWD/chrome-linux/chromedriver
- export PY_FILES_CHANGED=`git diff --name-only $TRAVIS_COMMIT_RANGE | grep ^py/`
- export RB_FILES_CHANGED=`git diff --name-only $TRAVIS_COMMIT_RANGE | grep ^rb/`
- ./go clean build
- |
if [[ $PY_FILES_CHANGED == py/* ]]; then
pip install --user virtualenv
export PATH=$PATH:$HOME/.local/bin
./go py_prep_for_install_release //py:phantomjs_test:run
else
echo 'no Python files changed - skipping Python test suite'
fi
- |
if [[ $RB_FILES_CHANGED == rb/* ]]; then
export PHANTOMJS_NAME=phantomjs-2.1.1-linux-x86_64
curl -L -O "https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOMJS_NAME}.tar.bz2"
tar -xvjf $PHANTOMJS_NAME.tar.bz2
chmod +x $PHANTOMJS_NAME/bin/phantomjs
mv $PHANTOMJS_NAME/bin/phantomjs chrome-linux/phantomjs
export PHANTOMJS_BINARY=$PWD/chrome-linux/phantomjs
rvm install 2.2.3
rvm use 2.2.3
./go //rb:unit-test //rb:firefox-test //rb:phantomjs-test //rb:chrome-test
else
echo 'no Ruby files changed - skipping Ruby test suite'
fi