-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
30 lines (30 loc) · 1.16 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
sudo: false
language: python
cache: pip
script: tox
python:
- 2.6
- 2.7
- 3.3
- 3.4
- 3.5
- 3.6
- pypy
install: travis_retry pip install tox-travis
services:
#- mongodb
- redis-server
before_script:
# work-around to make travis-ci working with mongod 3.4
# https://github.com/travis-ci/travis-ci/issues/3694
# https://github.com/travis-ci/apt-package-whitelist/issues/516
- wget http://fastdl.mongodb.org/linux/mongodb-linux-x86_64-3.4.7.tgz -O /tmp/mongodb.tgz
- tar -xvf /tmp/mongodb.tgz
- mkdir /tmp/data
- ${PWD}/mongodb-linux-x86_64-3.4.7/bin/mongod --dbpath /tmp/data --bind_ip 127.0.0.1 --noauth &> /dev/null &
- until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done
- sleep 15
# timer is needed in order to get mongo to properly initialize on travis-ci
# See https://github.com/travis-ci/travis-ci/issues/1967#issuecomment-42008605
- "${PWD}/mongodb-linux-x86_64-3.4.7/bin/mongo eve_test --eval 'db.createUser({\"user\": \"test_user\", \"pwd\": \"test_pw\", \"roles\": [\"readWrite\", \"dbAdmin\"]},{\"w\": \"majority\" , \"wtimeout\": 5000 })'"
#- mongo eve_test --eval 'db.addUser("test_user", "test_pw");'