Commit d87ff0be by Carsten Brandt

Merge pull request #1343 from pmoust/sphinx

Sphinx test integration for Travis (from #1341)
parents 8995c0b0 332fdf98
...@@ -13,6 +13,7 @@ before_script: ...@@ -13,6 +13,7 @@ before_script:
- composer self-update && composer --version - composer self-update && composer --version
- composer require satooshi/php-coveralls 0.6.* --dev --prefer-dist - composer require satooshi/php-coveralls 0.6.* --dev --prefer-dist
- mysql -e 'CREATE DATABASE yiitest;'; - mysql -e 'CREATE DATABASE yiitest;';
- mysql -D yiitest -u travis < /home/travis/build/yiisoft/yii2/tests/unit/data/sphinx/source.sql
- psql -U postgres -c 'CREATE DATABASE yiitest;'; - psql -U postgres -c 'CREATE DATABASE yiitest;';
- echo 'elasticsearch version ' && curl http://localhost:9200/ - echo 'elasticsearch version ' && curl http://localhost:9200/
- tests/unit/data/travis/apc-setup.sh - tests/unit/data/travis/apc-setup.sh
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# Setup test environment: # Setup test environment:
# - initialize test database source: # - initialize test database source:
# mysql -D yii2test -u test < /path/to/yii/tests/unit/data/sphinx/source.sql # mysql -D yiitest -u test < /path/to/yii/tests/unit/data/sphinx/source.sql
# - setup test Sphinx indexes: # - setup test Sphinx indexes:
# indexer --config /path/to/yii/tests/unit/data/sphinx/sphinx.conf --all [--rotate] # indexer --config /path/to/yii/tests/unit/data/sphinx/sphinx.conf --all [--rotate]
# - run the "searchd" daemon: # - run the "searchd" daemon:
...@@ -39,7 +39,7 @@ source yii2_test_item_src ...@@ -39,7 +39,7 @@ source yii2_test_item_src
sql_host = localhost sql_host = localhost
sql_user = travis sql_user = travis
sql_pass = sql_pass =
sql_db = yii2test sql_db = yiitest
sql_port = 3306 # optional, default is 3306 sql_port = 3306 # optional, default is 3306
sql_query = \ sql_query = \
......
...@@ -10,3 +10,5 @@ The scripts are: ...@@ -10,3 +10,5 @@ The scripts are:
Compiles and installs the [memcache pecl extension](http://pecl.php.net/package/memcache) Compiles and installs the [memcache pecl extension](http://pecl.php.net/package/memcache)
- [`cubrid-setup.sh`](cubrid-setup.sh) - [`cubrid-setup.sh`](cubrid-setup.sh)
Prepares the [CUBRID](http://www.cubrid.org/) server instance by installing the server and PHP PDO driver Prepares the [CUBRID](http://www.cubrid.org/) server instance by installing the server and PHP PDO driver
- [`sphinx-setup.sh`](sphinx-setup.sh)
Prepares the [Sphinx](http://sphinxsearch.com/) server instances by installing the server and attaching it to MySQL
\ No newline at end of file
...@@ -18,6 +18,10 @@ sudo chmod -R 777 /var/log/sphinx # ugly (for travis) ...@@ -18,6 +18,10 @@ sudo chmod -R 777 /var/log/sphinx # ugly (for travis)
sudo mkdir /var/lib/sphinx sudo mkdir /var/lib/sphinx
sudo chmod 777 /var/lib/sphinx # ugly (for travis) sudo chmod 777 /var/lib/sphinx # ugly (for travis)
# run dir pid
sudo mkdir /var/run/sphinx
sudo chmod 777 /var/run/sphinx # ugly (for travis)
# setup test Sphinx indexes: # setup test Sphinx indexes:
indexer --config $CWD/../sphinx/sphinx.conf --all indexer --config $CWD/../sphinx/sphinx.conf --all
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment