Skip to content

Commit 3e80df3

Browse files
committed
PHPLIB-98: Add multiple server versions to Travis CI
1 parent 786025d commit 3e80df3

File tree

1 file changed

+19
-4
lines changed

1 file changed

+19
-4
lines changed

.travis.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,27 @@ php:
77
- 5.6
88

99
env:
10-
- MONGODB_VERSION=alpha
10+
global:
11+
- KEY_SERVER="hkp://keyserver.ubuntu.com:80"
12+
- MONGO_REPO_URI="http://repo.mongodb.com/apt/ubuntu"
13+
- MONGO_REPO_TYPE="precise/mongodb-enterprise/"
14+
- SOURCES_LOC="/etc/apt/sources.list.d/mongodb.list"
15+
matrix:
16+
- DRIVER_VERSION=alpha SERVER_VERSION=2.4
17+
- DRIVER_VERSION=alpha SERVER_VERSION=2.6
18+
- DRIVER_VERSION=alpha SERVER_VERSION=3.0
1119

12-
services: mongodb
20+
before_install:
21+
- sudo apt-key adv --keyserver ${KEY_SERVER} --recv 7F0CEB10
22+
- echo "deb ${MONGO_REPO_URI} ${MONGO_REPO_TYPE}${SERVER_VERSION} multiverse" | sudo tee ${SOURCES_LOC}
23+
- sudo apt-get update -qq
24+
25+
install:
26+
- if dpkg --compare-versions ${SERVER_VERSION} le "2.4"; then export SERVER_PACKAGE=mongodb-10gen-enterprise; else export SERVER_PACKAGE=mongodb-enterprise; fi
27+
- sudo apt-get install ${SERVER_PACKAGE}
1328

1429
before_script:
15-
- mongo --eval 'tojson(db.runCommand({buildInfo:1}))'
16-
- pecl install -f mongodb-${MONGODB_VERSION}
30+
- mongod --version
31+
- pecl install -f mongodb-${DRIVER_VERSION}
1732
- php --ri mongodb
1833
- composer install --dev --no-interaction --prefer-source

0 commit comments

Comments
 (0)