-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #608 from shish/develop
Merge from develop into master
- Loading branch information
Showing
314 changed files
with
7,288 additions
and
49,102 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,62 @@ | ||
language: php | ||
sudo: false | ||
|
||
php: | ||
- 5.4 | ||
- 5.5 | ||
- 5.6 | ||
- nightly | ||
- 5.6 | ||
- 7.0 | ||
- 7.1 | ||
|
||
sudo: false | ||
|
||
env: | ||
matrix: | ||
- DB=mysql | ||
- DB=pgsql | ||
- DB=sqlite | ||
- DB=mysql | ||
- DB=pgsql | ||
- DB=sqlite | ||
allow_failures: | ||
- DB=sqlite | ||
|
||
cache: | ||
directories: | ||
- vendor | ||
- $HOME/.composer/cache | ||
|
||
before_install: | ||
- travis_retry composer self-update && composer --version #travis is bad at updating composer | ||
- if [ -n "$GH_TOKEN" ]; then composer config github-oauth.github.com ${GH_TOKEN}; fi; | ||
|
||
install: | ||
- mkdir -p data/config | ||
- if [[ "$DB" == "pgsql" ]]; then psql -c "SELECT set_config('log_statement', 'all', false);" -U postgres; fi | ||
- if [[ "$DB" == "pgsql" ]]; then psql -c "CREATE DATABASE shimmie;" -U postgres; fi | ||
- if [[ "$DB" == "pgsql" ]]; then echo '<?php define("DATABASE_DSN", "pgsql:user=postgres;password=;host=;dbname=shimmie");' > data/config/auto_install.conf.php ; fi | ||
- if [[ "$DB" == "mysql" ]]; then mysql -e "SET GLOBAL general_log = 'ON';" -uroot; fi | ||
- if [[ "$DB" == "mysql" ]]; then mysql -e "CREATE DATABASE shimmie;" -uroot; fi | ||
- if [[ "$DB" == "mysql" ]]; then echo '<?php define("DATABASE_DSN", "mysql:user=root;password=;host=localhost;dbname=shimmie");' > data/config/auto_install.conf.php ; fi | ||
- if [[ "$DB" == "sqlite" ]]; then echo '<?php define("DATABASE_DSN", "sqlite:shimmie.sqlite");' > data/config/auto_install.conf.php ; fi | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- mkdir -p data/config | ||
- | | ||
if [[ "$DB" == "pgsql" ]]; then | ||
psql -c "SELECT set_config('log_statement', 'all', false);" -U postgres ; | ||
psql -c "CREATE DATABASE shimmie;" -U postgres ; | ||
echo '<?php define("DATABASE_DSN", "pgsql:user=postgres;password=;host=;dbname=shimmie");' > data/config/auto_install.conf.php ; | ||
fi | ||
- | | ||
if [[ "$DB" == "mysql" ]]; then | ||
mysql -e "SET GLOBAL general_log = 'ON';" -uroot ; | ||
mysql -e "CREATE DATABASE shimmie;" -uroot ; | ||
echo '<?php define("DATABASE_DSN", "mysql:user=root;password=;host=localhost;dbname=shimmie");' > data/config/auto_install.conf.php ; | ||
fi | ||
- if [[ "$DB" == "sqlite" ]]; then echo '<?php define("DATABASE_DSN", "sqlite:shimmie.sqlite");' > data/config/auto_install.conf.php ; fi | ||
- composer install | ||
- php install.php | ||
|
||
script: | ||
- php install.php | ||
- phpunit --configuration tests/phpunit.xml --coverage-clover=data/coverage.clover | ||
- vendor/bin/phpunit --configuration tests/phpunit.xml --coverage-clover=data/coverage.clover | ||
|
||
after_failure: | ||
- head -n 100 data/config/* | ||
- ls /var/run/mysql* | ||
- ls /var/log/*mysql* | ||
- cat /var/log/mysql.err | ||
- cat /var/log/mysql.log | ||
- cat /var/log/mysql/error.log | ||
- cat /var/log/mysql/slow.log | ||
- ls /var/log/postgresql | ||
- cat /var/log/postgresql/postgresql* | ||
- head -n 100 data/config/* | ||
- ls /var/run/mysql* | ||
# All of the below commands require sudo, which we can't use without losing some speed & caching. | ||
# SEE: https://docs.travis-ci.com/user/workers/container-based-infrastructure/ | ||
# - ls /var/log/*mysql* | ||
# - cat /var/log/mysql.err | ||
# - cat /var/log/mysql.log | ||
# - cat /var/log/mysql/error.log | ||
# - cat /var/log/mysql/slow.log | ||
# - ls /var/log/postgresql | ||
# - cat /var/log/postgresql/postgresql* | ||
|
||
after_script: | ||
- php ocular.phar code-coverage:upload --format=php-clover data/coverage.clover | ||
- wget https://scrutinizer-ci.com/ocular.phar | ||
- php ocular.phar code-coverage:upload --format=php-clover data/coverage.clover |
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.