forked from ENCODE-DCC/encoded
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
60 lines (60 loc) · 2.28 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: python
python:
- "2.7"
env:
global:
- secure: |-
CMKR45ew7fJWfF/rvaFkV4gNhWRDdM4y8wlj5p1qrEzJ214SENg03fjHJr6B
cvNf7vanTJKnVxpxUK9kH5Tn/uaJZtnbnJYehZ4YKwzbJQEAEJpWvCk4C54O
7diAxOq7YSxxqA2XdtLydkNlo85BWoucmc0yHEl3weNR9554UmM=
- secure: |-
WmE7J5Vxheir50Heuji0JVpEmoYH5iPkLMQFgnocY1UspO1ka1+8M7SOgsUH
SK5yLKZ/6oJyhlySqqTmCfYy3y/WXRNG76dy1kjVj/DEbx+n6Yu0nElw84ED
ZR5KkpFMaKLA505soY+4lJc4jRl5u0qwCB1Ad3UgTgfkI4QSaGM=
- CONNECT_URL=http://saucelabs.com/downloads/Sauce-Connect-latest.zip
- CONNECT_DOWNLOAD=Sauce_Connect.zip
- CONNECT_LOG=sauce_connect.log
- READY_FILE=connect.ready
- PATH="/usr/share/elasticsearch/bin:/usr/lib/postgresql/9.3/bin:$PATH"
services:
- elasticsearch
before_install:
- whereis elasticsearch
- curl $CONNECT_URL > $CONNECT_DOWNLOAD
- unzip $CONNECT_DOWNLOAD Sauce-Connect.jar
- >
java -jar Sauce-Connect.jar --readyfile $READY_FILE
--logfile $CONNECT_LOG
--tunnel-identifier $TRAVIS_JOB_NUMBER
$SAUCE_USERNAME $SAUCE_ACCESS_KEY > sauce-connect.log &
- pip install -U setuptools
- virtualenv clean-python
- source clean-python/bin/activate
- sudo service postgresql stop
- sudo service postgresql start 9.3
- sudo -u postgres createdb --owner=$USER encoded
- postgres --version
- initdb --version
- sudo service elasticsearch stop
- elasticsearch -v
install:
- python bootstrap.py
- bin/buildout
before_script:
- while [ ! -f $READY_FILE ]; do sleep .5; done
script: >
bin/test -v -v --timeout=200 --remote-webdriver
--engine-url postgresql:///encoded
--browser-arg url "http://$SAUCE_USERNAME:$SAUCE_ACCESS_KEY@localhost:4445/wd/hub"
--browser-arg tunnel-identifier "$TRAVIS_JOB_NUMBER"
--browser-arg-int build "$TRAVIS_BUILD_NUMBER"
--browser-arg name "$TRAVIS_REPO_SLUG $TRAVIS_BRANCH $TRAVIS_COMMIT"
--browser-arg-int wait_time 10
--browser 'Chrome'
after_script:
- export SAUCE_JOB_ID=`grep -m 1 /session/ $CONNECT_LOG | cut -d / -f 7`
- export 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:[email protected]/rest/v1/$SAUCE_USERNAME/jobs/$SAUCE_JOB_ID"
- echo "Sauce test page https://saucelabs.com/tests/$SAUCE_JOB_ID"