forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
170 lines (169 loc) · 5.99 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
language: java
sudo: required
jdk: oraclejdk8
notifications:
email: false
irc:
channels:
- secure: K+Wuro8Y/66zt9truTZuZzFmPqiGrFsH/sPzOBDK3+57mL6/vg2NoQCXOTq3U5RLdVKavlvZcm6+9nsNncVPRgzL7ORuW3BgLaBJis3lTA13AqlOnAbXcYytQEulVeWmvPipHFFFqaHs/z77lxm4fKwAAuBnK1f+mXKZDZR2hLo=
on_success: never
on_failure: always
use_notice: true
skip_join: true
env:
global:
- DISPLAY=:99.0
matrix:
- TASK=build
- TASK=atoms
- TASK=atoms_test
- TASK=atoms_tests TARGET=chrome
- TASK=atoms_tests TARGET=ff-legacy
- TASK=java TARGET=java_small_tests
- TASK=java TARGET=chrome
- TASK=java TARGET=chrome-rc-test
- TASK=java TARGET=firefox
- TASK=java TARGET=ff-legacy
- TASK=java TARGET=firefox-rc-test
- TASK=java TARGET=grid TOXENV=chrome
- TASK=java TARGET=htmlunit
- TASK=api_docs TARGET=java
- TASK=api_docs TARGET=py_
- TASK=api_docs TARGET="//rb:"
- TASK=rb TARGET=unit-test
- TASK=rb TARGET=chrome-test
- TASK=rb TARGET=firefox-test
- TASK=rb TARGET=ff-legacy-test
- TASK=rb TARGET=phantomjs-test
- TASK=rb TARGET=remote-chrome-test
- TASK=rb TARGET=remote-firefox-test
- TASK=rb TARGET=remote-ff-legacy-test
- TASK=rb TARGET=remote-phantomjs-test
- TASK=py TOXENV=py27-chrome
- TASK=py TOXENV=py27-firefox
- TASK=py TOXENV=py27-marionette
- TASK=py TOXENV=py27-phantomjs
- TASK=py TOXENV=py27-remote
matrix:
fast_finish: true
allow_failures:
- env: TASK=rb TARGET=remote-firefox-test
- env: TASK=py TOXENV=py27-firefox
- env: TASK=py TOXENV=py27-remote
- env: TASK=api_docs TARGET="//rb:"
- env: TASK=java TARGET=firefox
- env: TASK=java TARGET=firefox-rc-test
- env: TASK=java TARGET=chrome-rc-test
- env: TASK=atoms_tests TARGET=ff-legacy
before_script:
- sh -e /etc/init.d/xvfb start
script:
- |
if [[ $TARGET+$TOXENV == *"chrome"* ]]; then
sudo apt-get -y purge chromium-browser
export CHROME_REVISION=`curl -s http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/LAST_CHANGE`
curl -L -O "http://commondatastorage.googleapis.com/chromium-browser-snapshots/Linux_x64/${CHROME_REVISION}/chrome-linux.zip"
unzip chrome-linux.zip
sudo ln -sf $PWD/chrome-linux/chrome-wrapper /usr/local/bin/chrome
export CHROMEDRIVER_VERSION=`curl -s http://chromedriver.storage.googleapis.com/LATEST_RELEASE`
curl -L -O "http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
unzip chromedriver_linux64.zip && chmod +x chromedriver && sudo mv chromedriver /usr/local/bin
fi
- |
if [[ $TARGET == *"ff-legacy"* ]] || [ $TOXENV == *"firefox"* ]]; then
pip install --user mozdownload mozinstall
mozdownload --version 45.4.0esr --destination firefox.tar.bz2
mozinstall firefox.tar.bz2
sudo ln -sf $PWD/firefox/firefox /usr/local/bin/firefox
firefox --version
export FF_LEGACY_BINARY=$PWD/firefox/firefox
fi
- |
if [[ $TARGET == *"firefox"* ]] || [[ $TOXENV == *"marionette"* ]] || [[ $TOXENV == *"remote"* ]]; then
export GECKODRIVER_VERSION=v0.11.1
curl -L -o geckodriver.tar.gz https://github.com/mozilla/geckodriver/releases/download/${GECKODRIVER_VERSION}/geckodriver-${GECKODRIVER_VERSION}-linux64.tar.gz
gunzip -c geckodriver.tar.gz | tar xopf -
chmod +x geckodriver && sudo mv geckodriver /usr/local/bin
pip install --user mozdownload mozinstall
mozdownload --version latest --destination firefox.tar.bz2
mozinstall firefox.tar.bz2
sudo ln -sf $PWD/firefox/firefox /usr/local/bin/firefox
firefox --version
fi
- |
if [[ $TARGET+$TOXENV == *"phantomjs"* ]]; then
#export PHANTOMJS_NAME=phantomjs-2.1.1-linux-x86_64
#curl -OL "https://bitbucket.org/ariya/phantomjs/downloads/${PHANTOMJS_NAME}.tar.bz2"
#tar -xvjf $PHANTOMJS_NAME.tar.bz2
#chmod +x $PHANTOMJS_NAME/bin/phantomjs
phantomjs -v
fi
- |
if [[ $TOXENV == *"remote"* ]]; then
./go selenium-server-standalone
fi
- |
if [[ $TASK == "build" ]]; then
./go build
fi
- |
if [[ $TASK == "atoms" ]]; then
./go //javascript/atoms:atoms
./go //javascript:calcdeps
./go //javascript/webdriver:all_js
./go //javascript/ie-driver:atoms
./go //javascript/chrome-driver:atoms
./go //javascript/android-atoms:atoms ios_driver
fi
- |
if [[ $TASK == "atoms_test" ]]; then
./go //java/client/test/org/openqa/selenium/atoms:test:run
fi
- |
if [[ $TASK == "atoms_tests" ]]; then
./go calcdeps
if [[ $TARGET == "ff-legacy" ]]; then
TARGET=firefox
fi
./go //javascript/atoms:atoms-$TARGET:run //javascript/webdriver:webdriver-$TARGET:run //javascript/selenium-atoms:selenium-atoms-$TARGET:run //javascript/selenium-core:selenium-core-$TARGET:run
fi
- |
if [[ $TASK == "java" ]]; then
case $TARGET in
ff-legacy)
./go test_firefox
;;
firefox)
./go //java/client/test/org/openqa/selenium/firefox:marionette:run
;;
# -rc are the WebDriverBackedSelenium tests
firefox-rc-test)
./go //java/client/test/com/thoughtworks/selenium:firefox-rc-test:run
;;
chrome-rc-test)
./go //java/client/test/com/thoughtworks/selenium:chrome-rc-test:run
;;
*)
./go test_$TARGET
;;
esac
fi
- |
if [[ $TASK == "py" ]]; then
./go py_prep_for_install_release
pip install --user tox-travis
tox -- --verbose --instafail
fi
- |
if [[ $TASK == "rb" ]]; then
rvm install 2.2.3
rvm use 2.2.3
./go //rb:$TARGET
fi
- |
if [[ $TASK == "api_docs" ]]; then
if [[ $TARGET == "py_" ]]; then
./go py_prep_for_install_release
fi
./go ${TARGET}docs
fi