-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
29 lines (25 loc) · 1.45 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
language: node_js
node_js:
- "5"
- "4"
- "0.12"
- "0.10"
env:
- MONGODB_VERSION="2.6*"
- MONGODB_VERSION="2.8*"
- MONGODB_VERSION="3.0*"
before_install:
# MongoDB
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
- if [ "$MONGODB_VERSION" = "2.4*" ]; then echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | sudo tee /etc/apt/sources.list.d/mongodb.list; fi
- if [ "$MONGODB_VERSION" = "2.6*" ]; then echo "deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen" | sudo tee /etc/apt/sources.list.d/mongodb.list; fi
- if [ "$MONGODB_VERSION" = "2.8*" ]; then echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/testing multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-2.8.list; fi
- if [ "$MONGODB_VERSION" = "3.0*" ]; then echo "deb http://repo.mongodb.org/apt/ubuntu "$(lsb_release -sc)"/mongodb-org/testing multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.0.list; fi
- sudo apt-get update
- if [ "$MONGODB_VERSION" = "2.4*" ]; then sudo apt-get install -y mongodb-10gen=`echo $MONGODB_VERSION`; fi
- if [ "$MONGODB_VERSION" != "2.4*" ]; then sudo apt-get install -y --force-yes mongodb-org-server=`echo $MONGODB_VERSION`; fi
- mongod --version
- if [ "$MONGODB_VERSION" = "2.4*" ]; then sudo service mongodb start; fi
before_script:
- until nc -z localhost 27017; do echo Waiting for MongoDB; sleep 1; done
script: "npm test"