-
Notifications
You must be signed in to change notification settings - Fork 676
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for running all tests on travis.
Move travis before_script to a script in extras. Add apache and mysql confs to extras. Modify test harnesses to be travis aware. (Make sure and send some output, sleep occasionally) Switch migration urls to non-redirecting www. Occasionally output while in Travis mode to prevent travis stopping. Added a mode to just test install to allow the build matrix to only test the install in one build, not all. references #1328
- Loading branch information
1 parent
027f7d0
commit 5e5649b
Showing
13 changed files
with
208 additions
and
63 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,24 @@ | ||
language: php | ||
|
||
php: | ||
- 5.5 | ||
- 5.4 | ||
- 5.3 | ||
- 5.2 | ||
|
||
before_script: | ||
- mysql -e 'create database thinkup' | ||
- cp extras/dev/config/config.inc.php webapp/config.inc.php | ||
- cp extras/dev/config/config.tests.inc.php tests/config.tests.inc.php | ||
- chmod -R 777 webapp/data | ||
- mkdir webapp/data/logs/ | ||
- touch webapp/data/logs/stream.log | ||
- touch webapp/data/logs/crawler.log | ||
env: | ||
- JUST_INSTALL=1 | ||
- SKIP_UPGRADE_TESTS=1 | ||
|
||
matrix: | ||
exclude: | ||
- php: 5.5 | ||
env: JUST_INSTALL=1 | ||
- php: 5.3 | ||
env: JUST_INSTALL=1 | ||
- php: 5.2 | ||
env: JUST_INSTALL=1 | ||
|
||
before_script: extras/dev/travis/before.sh | ||
|
||
script: php tests/all_unit_tests.php | ||
script: php tests/all_tests.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/sh | ||
|
||
sudo cp extras/dev/travis/my-override.cnf /etc/mysql/conf.d/ | ||
sudo service mysql restart | ||
mysql -e 'create database thinkup' | ||
cp extras/dev/config/config.inc.php webapp/config.inc.php | ||
cp extras/dev/config/config.tests.inc.php tests/config.tests.inc.php | ||
mkdir webapp/data/sessions/ | ||
chmod -R 777 webapp/data | ||
chmod -f -R 777 build | ||
mkdir webapp/data/logs/ | ||
|
||
touch webapp/data/logs/stream.log | ||
touch webapp/data/logs/crawler.log | ||
sudo apt-get install apache2 libapache2-mod-fastcgi | ||
export PHPV=$(phpenv version-name) | ||
echo "Running PHP = $PHPV" | ||
echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$PHPV/etc/php.ini | ||
if [ "$PHPV" = "5.2" ]; then | ||
echo "I'm in here." | ||
sudo sh -c "echo 'error_reporting = 22527' >> ~/.phpenv/versions/$PHPV/etc/php.ini" | ||
sudo sh -c "echo 'session.save_path = "$(pwd)/webapp/data/sessions"' >> ~/.phpenv/versions/$PHPV/etc/php.ini" | ||
sudo a2enmod rewrite actions alias | ||
sudo cp -f extras/dev/travis/travis-ci-apache-php52 /etc/apache2/sites-available/default | ||
sudo sed -e "s?%PHPPATH%?/home/travis/.phpenv/versions/5.2/bin?g" --in-place /etc/apache2/sites-available/default | ||
else | ||
sudo cp ~/.phpenv/versions/$PHPV/etc/php-fpm.conf.default ~/.phpenv/versions/$PHPV/etc/php-fpm.conf | ||
sudo sh -c "echo 'php_value[error_reporting] = 22527' >> ~/.phpenv/versions/$PHPV/etc/php-fpm.conf" | ||
sudo sh -c "echo 'php_value[session.save_path] = "$(pwd)/webapp/data/sessions"' >> ~/.phpenv/versions/$PHPV/etc/php-fpm.conf" | ||
echo "cgi.fix_pathinfo = 1" >> ~/.phpenv/versions/$PHPV/etc/php.ini | ||
~/.phpenv/versions/$PHPV/sbin/php-fpm | ||
sudo a2enmod rewrite actions fastcgi alias | ||
sudo cp -f extras/dev/travis/travis-ci-apache /etc/apache2/sites-available/default | ||
fi | ||
|
||
sudo sed -e "s?%TRAVIS_BUILD_DIR%?$(pwd)/webapp?g" --in-place /etc/apache2/sites-available/default | ||
sudo service apache2 restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
[mysqld] | ||
collation-server = utf8_general_ci | ||
collation_server = utf8_general_ci | ||
init_connect='SET collation_connection = utf8_general_ci' | ||
wait_timeout = 28800 | ||
interactive_timeout = 28800 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<VirtualHost *:80> | ||
DocumentRoot %TRAVIS_BUILD_DIR% | ||
|
||
<Directory "%TRAVIS_BUILD_DIR%"> | ||
Options FollowSymLinks MultiViews ExecCGI | ||
AllowOverride All | ||
Order deny,allow | ||
Allow from all | ||
</Directory> | ||
|
||
# Wire up Apache to use Travis CI's php-fpm. | ||
<IfModule mod_fastcgi.c> | ||
AddHandler php5-fcgi .php | ||
Action php5-fcgi /php5-fcgi | ||
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi | ||
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -host 127.0.0.1:9000 -pass-header Authorization | ||
</IfModule> | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<VirtualHost *:80> | ||
DocumentRoot %TRAVIS_BUILD_DIR% | ||
|
||
<Directory "%TRAVIS_BUILD_DIR%"> | ||
Options FollowSymLinks MultiViews ExecCGI | ||
AllowOverride All | ||
Order deny,allow | ||
Allow from all | ||
</Directory> | ||
|
||
ScriptAlias /local-bin %PHPPATH% | ||
AddType application/x-httpd-php .php | ||
AddHandler application/x-httpd-php5 php | ||
Action application/x-httpd-php5 /local-bin/php-cgi | ||
</VirtualHost> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.