forked from Sefaria/Sefaria-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
70 lines (52 loc) · 3.48 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
language: python
python:
- "2.7"
cache: pip
services:
- mongodb
addons:
sauce_connect:
username: "sefaria"
access_key:
secure: "QS2L6wVpfCV0tc2mxhaKekTwoQw2z3NjG082mFd4J3xZiwDIOlP9yHmUnF7lkb89kn6/uyf5NOSwE33kvSJB03NIosd0pBRA3bvBf7UGpUiZwE5t2IHyGDMDB+QPW9xZORBhA0fZpPZucyb4EO1WLBqlajZLTEup6um7HaqBI+nsu/7cZJIUkqmMp6qPTaBV8BUDL/ehnXg8jm66+Gb5BAyApx1DU8eugVhEWdvPs3evQTxcQnVOXQtn2VR5A0QHpa6lz5J9tJcd3HVb9oWQ84WkO5LqVRXvpTp/1LNMyJ/v6VL3kxB5Y7pWU+pytaxaBnzV5dYjAv6+0Ea4a2CBqmpcwT1OWNAqgWt3FusMt8HLO374aeHMtPtj7Ou54GuQxJoMBOhe3MbZ55SEkOuqhPVa6FCCYAevAPVlku1XOTgQeMzJeIrZ3/Wv8sx07U2UGwAl+xBKOYRaCOOwWYPKWWsIBPeH1bQD6SqPSuYxbu4iGN/xrakvHHEjRLIjy/iHleMX62ELGpaAqt8Ppzjn5Z0Oh7aG14pyP3dzQy7vgDCIQ7ZFtTSDdPC9PiOSQ5aQkaFL4FU9ElaetHEWqFayghj10sSuSuO8Q+U8arW+wHWEotaZ7dfvhX0fHHSotEye+loIXVHm6bSOq8XPaZqJ+z/djxysmKfxUynIeOX73zY="
env:
PYTHONPATH=$TRAVIS_BUILD_DIR
DJANGO_SETTINGS_MODULE=sefaria.settings
# command to install dependencies
install: "pip install -r requirements.txt"
before_script:
# Create a writable log dir
- mkdir log
- chmod 777 log
# Install mongo 2.6.6 (default is too old) - as per https://docs.mongodb.com/v2.6/tutorial/install-mongodb-on-ubuntu/
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
- echo 'deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen' | sudo tee /etc/apt/sources.list.d/mongodb.list
- sudo apt-get update
- sudo apt-get install -y mongodb-org=2.6.6 mongodb-org-server=2.6.6 mongodb-org-shell=2.6.6 mongodb-org-mongos=2.6.6 mongodb-org-tools=2.6.6
# Download and restore the Sefaria database
- wget http://dev.sefaria.org/static/dump_small.tar.gz
- tar -xzvf dump_small.tar.gz
- mongorestore --drop
# Copy in settings files tuned for the travis build
- cp ./sefaria/.travis.settings.py ./sefaria/local_settings.py
- cp ./reader/browsertest/framework/creds-example.py ./reader/browsertest/framework/creds.py
# Get rid of the conftest that forces a copy of the datastore to a test db
- rm ./sefaria/conftest.py
# Create the user db, and run the django server, redirecting output to log files
- python manage.py syncdb --noinput
- python manage.py runserver 2> server.error.log > server.log &
# Wait for server to come up
- while ! nc -z localhost 8000; do sleep 0.1; done;
# Prime the cache
- GET http://localhost:8000/api/texts/Genesis.1 > /dev/null &
- GET http://localhost:8000/api/preview/Zohar > /dev/null &
script:
- 'py.test -m "not deep and not failing"'
- 'if [ "${TRAVIS_PULL_REQUEST}" = "false" ]; then cd reader/browsertest && python run_tests_on_travis.py "Build - ${TRAVIS_BUILD_NUMBER}" 2> selenium.error.log; else true; fi;'
after_failure:
- cat $TRAVIS_BUILD_DIR/reader/browsertest/selenium.error.log
- cat $TRAVIS_BUILD_DIR/server.error.log
notifications:
slack:
rooms:
secure: "nOmFvlzqc8f/p3mQxfLaCpowPuxaohCsrk5f6kgXLccNZhPdc7NRwxo8Rr7a4APVzqwlcxV7TyPDX3qGHxcE5hp2ibHlZX1icx4/DkPejsUfIfPksFg30bYzl9qv18JwyVvtfB9hAehbJDjxKjMR+MPRkspNZbHnKex5p4FgE4wcaMNosqQnvo9qUmgVs7wxcFbx+jj0ULBI1pSbAo49HJF3djebcQLDmx0ZF/R4F8RmXmEDuhwYi/avywklRRRYuq9ilUMMFyuABovFBPzOjt77XpUmp+9jRSH0EbKujCeptyfzu2kc0Y4A6e/IhDL8p8fZ3ppCNY0TpWTiX0hKeUYB+IvAmU31CQb4vJXA21zmR2G/++l56zd+5DPsTDxgw7zdQCNte5Vlt6A6xob2UQZS10vBoxnK5vv4DDPTqUGo6s/1NoB4ReuFi/E26ytYBmdFcQRp967O2YEqCWUmquWc2KaNE8sloXCfvo+MthRHp4FolZ3+fy1znJqqkwA6ux2G03CCfdTiAnxOKLB67jjYCrOBo2ZP2vsVka5Bjcu82HySkMF5kAC5rdUMR9A8HQ5wPHN1Eu7IlG7Dr556GC8dICGFdUSnd4nQMc2Byb/iQWsn45elkGKDTXWGVxTe7qnQ8YGNjE5722aSRi3WaXIiRPrNdydaxIzlKG6YNPU="