This commit is contained in:
Daku 2016-05-20 05:44:29 +01:00
parent 4e163a3027
commit 4aa6278a58

View file

@ -2,42 +2,42 @@ language: php
sudo: false sudo: false
php: php:
- 5.4 - 5.4
- 5.5 - 5.5
- 5.6 - 5.6
- 7.0 - 7.0
env: env:
matrix: matrix:
- DB=mysql - DB=mysql
- DB=pgsql - DB=pgsql
- DB=sqlite - DB=sqlite
install: install:
- mkdir -p data/config - 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 "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 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" == "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 "SET GLOBAL general_log = 'ON';" -uroot; fi
- if [[ "$DB" == "mysql" ]]; then mysql -e "CREATE DATABASE shimmie;" -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" == "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 - 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 - wget https://scrutinizer-ci.com/ocular.phar
script: script:
- php install.php - php install.php
- phpunit --configuration tests/phpunit.xml --coverage-clover=data/coverage.clover - phpunit --configuration tests/phpunit.xml --coverage-clover=data/coverage.clover
after_failure: after_failure:
- head -n 100 data/config/* - head -n 100 data/config/*
- ls /var/run/mysql* - ls /var/run/mysql*
- ls /var/log/*mysql* - ls /var/log/*mysql*
- cat /var/log/mysql.err - cat /var/log/mysql.err
- cat /var/log/mysql.log - cat /var/log/mysql.log
- cat /var/log/mysql/error.log - cat /var/log/mysql/error.log
- cat /var/log/mysql/slow.log - cat /var/log/mysql/slow.log
- ls /var/log/postgresql - ls /var/log/postgresql
- cat /var/log/postgresql/postgresql* - cat /var/log/postgresql/postgresql*
after_script: after_script:
- php ocular.phar code-coverage:upload --format=php-clover data/coverage.clover - php ocular.phar code-coverage:upload --format=php-clover data/coverage.clover