From 4d1390ceb1690230d53bc41cd4d8997ab1cfc728 Mon Sep 17 00:00:00 2001 From: Carsten Brandt Date: Wed, 18 Dec 2013 03:41:19 +0100 Subject: [PATCH] fixed travis mongodb --- .travis.yml | 6 ++---- tests/unit/data/travis/mongodb-setup.sh | 11 +++++++++++ 2 files changed, 13 insertions(+), 4 deletions(-) create mode 100755 tests/unit/data/travis/mongodb-setup.sh diff --git a/.travis.yml b/.travis.yml index beb7776..da19dcb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,17 +15,15 @@ install: - composer self-update && composer --version # - composer require satooshi/php-coveralls 0.6.* --dev --prefer-dist - echo 'elasticsearch version ' && curl http://localhost:9200/ + - tests/unit/data/travis/mongodb-setup.sh - tests/unit/data/travis/apc-setup.sh - tests/unit/data/travis/memcache-setup.sh - tests/unit/data/travis/cubrid-setup.sh - - tests/unit/data/travis/sphinx-setup.sh - - echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini - - sudo 'echo "textSearchEnabled=true" >> /etc/mongodb.conf' - - sudo service restart mongodb before_script: - mysql -e 'CREATE DATABASE yiitest;'; - psql -U postgres -c 'CREATE DATABASE yiitest;'; + - tests/unit/data/travis/sphinx-setup.sh - mongo yii2test --eval 'db.addUser("travis", "test");' script: diff --git a/tests/unit/data/travis/mongodb-setup.sh b/tests/unit/data/travis/mongodb-setup.sh new file mode 100755 index 0000000..b79a897 --- /dev/null +++ b/tests/unit/data/travis/mongodb-setup.sh @@ -0,0 +1,11 @@ +#!/bin/sh +# +# install mongodb + +echo "extension = mongo.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini +sudo sh -c 'echo "setParameter = textSearchEnabled=true" >> /etc/mongodb.conf' +cat /etc/mongodb.conf + +mongod --version + +sudo service mongodb restart