-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.travis.yml
93 lines (93 loc) · 4.68 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
language: python
sudo: required
dist: precise
cache:
directories:
- eggs
- .npm
addons:
apt:
sources:
- elasticsearch-1.7
packages:
- elasticsearch
- graphviz
env:
global:
- secure: "TJYx9N1ZqFPTt5IBhc7GRQNEr5d7HlhRzXv8UnWCT1OSW4j1AHhXJ2Uql4tIUx0frwrSySCOMx+PFtg0vvf0iYOAR4jNl+/cgLV/6JgtnuGiKG3Pwyu7r3ED0I2v0ZV2jSVGAd0VW5/l4Wq7ZFRaPb6YQHKQ6HIhM+4CXaITT3Gg5+Q/ELCMTuxYqG0kFmRAuu+qsJYOFrbxvGuELhlRuYsSGKJj95YuJO2ImHLbbhwyERUPsVtZPk3om10TAT3o+nNqfy+CZNTmi7jusYcdOO/OJ8CDD/CM9bBnr65TQZix6ThTDT0wsGDYQiIgopWiu+reAkDAvI1zkOZcFHket7On1lC6eBATSTg1NZOV+aaSTJsyZzGH8qjGgOhsnIqTwrQ5/IphzzuORnpP2L1x0njYTssAM7F4xeCmlrLohzEsp2GLVacZE13kwZc1HLcldxM8deTtksoQxEZxFa6m4awOuBZqDTyAYUaf8BKv1YBGeNUxuUBe0e7o9AyS8cuOBfDaZ0/8I2hMgW2oXK6r+Gj8oZCaY1eY02b+E2LOZIiRiHxSjwMmi9TgySuQDWCjnv7Mqi3cWFiMshXNdPwASe0uRG1vskNwXJR9iBumvHPWcKUtb+LAGfSGAHfTnmWex3xcsDfLC6lgmxp/ZWWcUNJ1I38TIaoR0LLeU+k+DSg="
- secure: "XWASp1gWawQ7OjIuSnsjxPouHn97c/Kuexpm6lWMR+99Twgq/B/0MN2OshLFD5jD0zI/XCJ1Imd3mo4dyVGU1jh3fUrrzAGPEq9Zd/ziCk9TmFR714bfMnfnhrk8nZL4P3QDLqBQS949rcufDwoHwnUVTBpysRBk35UuiCA47IcUHr0bTyGvoL/E+whHWj/mEExRv2SIalfTnL2GJ8HcDDfNi15BmFNzfhTMPWdAUBoPfRUY1p5ESczwlYjS73alwVHfrLSS5QuymGDETjdyzeKfkKK1m328mB6HVNL8hsYb7ANlZrt6GBCWLDR6nHWCZo1faWBhO1uch0uNRY+mDZu1bq8POeB8dZaBebtdmRx7cTut4+4FpkI4d841uE/ICGmvRUhgaEswDe1pEMjSK8kiXi+q2YNQsplRxhf/fznKuhZ0xUhdOa+jxhi61SNFseDlkKhV3eKw/WrPAXPbBEooz4SINv1Ry6lxVqra17RfhoTyJ6jOAGGGHi7RSHSOsxXuig39d9SoUKjGyOyaHZkmlCgDkL+Za7DFtml0RCRITnuUv9pYxy6fIjbqG0W6B63FhKGa89E5YaJj/B5pZa5QkGOkLQVIayICHQDsLkq3mAFFq5C1rjd0d0LdbnbSCOt/c3mHk1sh9tHhGBB3d8ognp9rnA/g7GGBzwyM0xU="
- PATH="/usr/share/elasticsearch/bin:/usr/lib/postgresql/9.4/bin:$PATH"
# found workaround at https://github.com/travis-ci/travis-ci/issues/5246#issuecomment-245897470
# do not load /etc/boto.cfg with Python 3 incompatible plugin
# https://github.com/travis-ci/travis-ci/issues/5246#issuecomment-166460882
- BOTO_CONFIG=/doesnotexist
matrix:
include:
- python: "3.4"
env: BROWSER=Chrome
- python: "3.4"
env: BROWSER=
before_install:
- whereis elasticsearch
- postgres --version
- initdb --version
- elasticsearch -v
- nvm install 6
- node --version
- pip install setuptools==15.2
install:
- npm config set python /usr/bin/python2.7
- python bootstrap.py -v 2.9.5 --setuptools-version 15.2
- bin/buildout -c buildout-travis.cfg || (echo "Retrying buildout" && bin/buildout -c buildout-travis.cfg)
before_script:
- >
if test -n "$BROWSER"; then
CONNECT_URL=https://saucelabs.com/downloads/sc-4.5.3-linux.tar.gz
CONNECT_DOWNLOAD=sc.tar.gz
SC_READYFILE=$HOME/sauce-connect-ready-$RANDOM
SC_LOGFILE=$HOME/sauce-connect.log
SC_PIDFILE=$HOME/sauce-connect.pid
curl $CONNECT_URL > $CONNECT_DOWNLOAD
mkdir sc
tar -zxf $CONNECT_DOWNLOAD --strip 1 --directory sc
sc/bin/sc --readyfile $SC_READYFILE \
--logfile $SC_LOGFILE \
--pidfile $SC_PIDFILE \
--tunnel-identifier $TRAVIS_JOB_NUMBER \
--user $SAUCE_USERNAME --api-key $SAUCE_ACCESS_KEY > /dev/null &
while test -f "$SC_PIDFILE" && test ! -f "$SC_READYFILE"; do
sleep 0.5
done
fi
script:
- if test -z "$BROWSER"; then npm test; fi
- if test -z "$BROWSER"; then bin/test -v -v --timeout=600 -m "not bdd"; fi
- >
if test -n "$BROWSER"; then
test -s "$SC_PIDFILE" && sleep 10 && bin/test -v -v --timeout=600 -m "bdd" --tb=short \
--splinter-implicit-wait 60 \
--splinter-webdriver remote \
--splinter-remote-url "http://$SAUCE_USERNAME:$SAUCE_ACCESS_KEY@localhost:4445/wd/hub" \
--splinter-socket-timeout 600 \
--browser-arg tunnel-identifier "$TRAVIS_JOB_NUMBER" \
--browser-arg-int build "$TRAVIS_BUILD_NUMBER" \
--browser-arg-int idleTimeout 600 \
--browser-arg name "$TRAVIS_REPO_SLUG $TRAVIS_BRANCH $TRAVIS_COMMIT" \
--browser-arg browser "$BROWSER" \
--browser-arg platform "Linux"
fi
after_script:
- >
if test -f "$SC_PIDFILE"; then
# NOTE: Selenium Session ID/Sauce Connect Job ID is no longer stored in sauce-connect.log
# SAUCE_JOB_ID=`grep -m 1 /session/ "$HOME/sauce-connect.log" | cut -d / -f 7`
# SAUCE_PASSED=`((TRAVIS_TEST_RESULT == 0)) && echo true || echo false`
# curl -H "Content-Type:text/json" -s -X PUT -d "{\"passed\": $SAUCE_PASSED}" \
# "http://$SAUCE_USERNAME:$SAUCE_ACCESS_KEY@saucelabs.com/rest/v1/$SAUCE_USERNAME/jobs/$SAUCE_JOB_ID" > /dev/null
echo "Sauce test page https://saucelabs.com/tests/$SAUCE_JOB_ID"
# Wait for Sauce Connect to shut down its tunnel.
echo "Closing Sauce Connect tunnel."
SC_PID="$(cat $SC_PIDFILE)"
kill $SC_PID
wait $SC_PID
fi