diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-02-11 21:37:15 -0600 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-02-11 21:37:15 -0600 |
commit | 54e9f7b50ab8b25f63945c6ff09cc9ffa80c04af (patch) | |
tree | 09adec7705026866584002de8cb7f760581e876b /travis | |
parent | e4c37c159ab4eb152280dec8e46c9d98a26354a0 (diff) | |
parent | fa33eae556c248ef6b2d41d9c9203b29e23dfb3a (diff) | |
download | forums-54e9f7b50ab8b25f63945c6ff09cc9ffa80c04af.tar forums-54e9f7b50ab8b25f63945c6ff09cc9ffa80c04af.tar.gz forums-54e9f7b50ab8b25f63945c6ff09cc9ffa80c04af.tar.bz2 forums-54e9f7b50ab8b25f63945c6ff09cc9ffa80c04af.tar.xz forums-54e9f7b50ab8b25f63945c6ff09cc9ffa80c04af.zip |
Merge branch 'develop' of https://github.com/phpbb/phpbb3 into ticket/11103
# By Nathan Guse (28) and others
# Via Andreas Fischer (9) and others
* 'develop' of https://github.com/phpbb/phpbb3: (90 commits)
[ticket/11350] Do not pass $db by reference; typehint phpbb_db_driver
[feature/migrations] Remove default values from necessary parameters
[ticket/11201] Revert WLM dropping because it is still used in China.
[ticket/11220] Improvement to the info pop-up from "list="
[feature/migrations] Revert unrelated changes to functions.php
[ticket/11233] prohibit selecting anonymous user as a PM recipient
[ticket/11343] Remove spare parentheses.
[ticket/11343] Remove spare space.
[ticket/11343] Use === when checking stored user_actkey against user input.
[ticket/11295] Correct cases: replace postgres with phpbb_db_driver_postgres.
[ticket/10050] removing prosilver edits
[ticket/9737] Fix some comments
[ticket/11337] Abort setup-webserver.sh script when an error occurs.
[ticket/11337] Only run functional tests on 5.3.19 or higher. No FPM otherwise.
[ticket/11337] Silence nginx config file writing.
[ticket/11337] php-fpm.conf is no longer owned by root.
[ticket/11337] Run functional tests on travis using nginx and php-fpm.
[ticket/11338] Travis CI: Install PHP extension for redis key-value store.
[ticket/10050] adding .topicrow to template condition
[ticket/9737] Fix a few minor things in migrations
...
Conflicts:
phpBB/config/services.yml
phpBB/config/tables.yml
Diffstat (limited to 'travis')
-rwxr-xr-x | travis/install-php-extensions.sh | 21 | ||||
-rw-r--r-- | travis/phpunit-mysql-travis.xml | 4 | ||||
-rw-r--r-- | travis/phpunit-postgres-travis.xml | 4 | ||||
-rwxr-xr-x | travis/setup-webserver.sh | 54 |
4 files changed, 81 insertions, 2 deletions
diff --git a/travis/install-php-extensions.sh b/travis/install-php-extensions.sh new file mode 100755 index 0000000000..55955c2905 --- /dev/null +++ b/travis/install-php-extensions.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# +# @copyright (c) 2013 phpBB Group +# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +# +set -e + +function add_ext_to_php_ini +{ + echo "extension=$1.so" >> `php --ini | grep "Loaded Configuration" | sed -e "s|.*:\s*||"` +} + +# redis +git clone git://github.com/nicolasff/phpredis.git +cd phpredis +phpize +./configure +make +make install +cd .. +add_ext_to_php_ini 'redis' diff --git a/travis/phpunit-mysql-travis.xml b/travis/phpunit-mysql-travis.xml index cc033ff959..2d6af0e2ac 100644 --- a/travis/phpunit-mysql-travis.xml +++ b/travis/phpunit-mysql-travis.xml @@ -17,7 +17,7 @@ <exclude>tests/functional</exclude> </testsuite> <testsuite name="phpBB Functional Tests"> - <directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">../tests/functional</directory> + <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory> </testsuite> </testsuites> @@ -34,6 +34,8 @@ <server name="PHPBB_TEST_DBNAME" value="phpbb_tests" /> <server name="PHPBB_TEST_DBUSER" value="root" /> <server name="PHPBB_TEST_DBPASSWD" value="" /> + <server name="PHPBB_TEST_REDIS_HOST" value="localhost" /> <server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/> + <server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" /> </php> </phpunit> diff --git a/travis/phpunit-postgres-travis.xml b/travis/phpunit-postgres-travis.xml index 5019c225b4..a9062efafb 100644 --- a/travis/phpunit-postgres-travis.xml +++ b/travis/phpunit-postgres-travis.xml @@ -17,7 +17,7 @@ <exclude>tests/functional</exclude> </testsuite> <testsuite name="phpBB Functional Tests"> - <directory suffix="_test.php" phpVersion="5.3.0" phpVersionOperator=">=">../tests/functional</directory> + <directory suffix="_test.php" phpVersion="5.3.19" phpVersionOperator=">=">../tests/functional</directory> </testsuite> </testsuites> @@ -36,6 +36,8 @@ <server name="PHPBB_TEST_DBNAME" value="phpbb_tests" /> <server name="PHPBB_TEST_DBUSER" value="postgres" /> <server name="PHPBB_TEST_DBPASSWD" value="" /> + <server name="PHPBB_TEST_REDIS_HOST" value="localhost" /> <server name="PHPBB_TEST_TABLE_PREFIX" value="phpbb_"/> + <server name="PHPBB_FUNCTIONAL_URL" value="http://localhost/" /> </php> </phpunit> diff --git a/travis/setup-webserver.sh b/travis/setup-webserver.sh new file mode 100755 index 0000000000..beb04b0fef --- /dev/null +++ b/travis/setup-webserver.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# +# @copyright (c) 2013 phpBB Group +# @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 +# +set -e + +sudo apt-get update -qq +sudo apt-get install -qq nginx realpath + +sudo service nginx stop + +DIR=$(dirname "$0") +PHPBB_ROOT_PATH=$(realpath "$DIR/../phpBB") + +NGINX_CONF="/etc/nginx/sites-enabled/default" + +PHP_FPM_BIN="$HOME/.phpenv/versions/$TRAVIS_PHP_VERSION/sbin/php-fpm" +PHP_FPM_CONF="$DIR/php-fpm.conf" +PHP_FPM_SOCK=$(realpath "$DIR")/php-fpm.sock + +USER=$(whoami) + +# php-fpm configuration +echo " +[global] + +[travis] +user = $USER +group = $USER +listen = $PHP_FPM_SOCK +pm = static +pm.max_children = 2 + +php_admin_value[memory_limit] = 128M +" > $PHP_FPM_CONF + +# nginx configuration +echo " +server { + listen 80; + root $PHPBB_ROOT_PATH/; + index index.php index.html; + + location ~ \.php$ { + fastcgi_pass unix:$PHP_FPM_SOCK; + include fastcgi_params; + } +} +" | sudo tee $NGINX_CONF > /dev/null + +# Start daemons +sudo $PHP_FPM_BIN --fpm-config "$DIR/php-fpm.conf" +sudo service nginx start |