Browse Source

Travis: Adding sphinx support

tags/2.0.0-beta
Panagiotis Moustafellos 11 years ago
parent
commit
5cb2283d89
  1. 1
      .travis.yml
  2. 2
      tests/unit/data/config.php
  3. 4
      tests/unit/data/sphinx/sphinx.conf
  4. 15
      tests/unit/data/travis/sphinx-setup.sh

1
.travis.yml

@ -18,6 +18,7 @@ before_script:
- tests/unit/data/travis/apc-setup.sh - tests/unit/data/travis/apc-setup.sh
- tests/unit/data/travis/memcache-setup.sh - tests/unit/data/travis/memcache-setup.sh
- tests/unit/data/travis/cubrid-setup.sh - tests/unit/data/travis/cubrid-setup.sh
- tests/unit/data/travis/sphinx-setup.sh
#script: #script:
# - phpunit --coverage-clover tests/unit/runtime/coveralls/clover.xml --verbose --exclude-group mssql,oci,wincache,xcache,zenddata,vendor,sphinx # - phpunit --coverage-clover tests/unit/runtime/coveralls/clover.xml --verbose --exclude-group mssql,oci,wincache,xcache,zenddata,vendor,sphinx

2
tests/unit/data/config.php

@ -42,7 +42,7 @@ return [
'sphinx' => [ 'sphinx' => [
'sphinx' => [ 'sphinx' => [
'dsn' => 'mysql:host=127.0.0.1;port=9306;', 'dsn' => 'mysql:host=127.0.0.1;port=9306;',
'username' => '', 'username' => 'travis',
'password' => '', 'password' => '',
], ],
'db' => [ 'db' => [

4
tests/unit/data/sphinx/sphinx.conf

@ -14,7 +14,7 @@ source yii2_test_article_src
type = mysql type = mysql
sql_host = localhost sql_host = localhost
sql_user = sql_user = travis
sql_pass = sql_pass =
sql_db = yii2test sql_db = yii2test
sql_port = 3306 # optional, default is 3306 sql_port = 3306 # optional, default is 3306
@ -37,7 +37,7 @@ source yii2_test_item_src
type = mysql type = mysql
sql_host = localhost sql_host = localhost
sql_user = sql_user = travis
sql_pass = sql_pass =
sql_db = yii2test sql_db = yii2test
sql_port = 3306 # optional, default is 3306 sql_port = 3306 # optional, default is 3306

15
tests/unit/data/travis/sphinx-setup.sh

@ -0,0 +1,15 @@
#!/bin/sh
SCRIPT=$(readlink -f "$0")
CWD=$(dirname "$SCRIPT")
# install sphinxsearch:
echo 'yes' | sudo add-apt-repository ppa:builds/sphinxsearch-daily
sudo apt-get update
sudo apt-get install sphinxsearch
# setup test Sphinx indexes:
indexer --config $CWD/../sphinx/sphinx.conf --all
# run searchd:
searchd --config $CWD/../sphinx/sphinx.conf
Loading…
Cancel
Save