2014-02-10 05:33:57 +00:00
|
|
|
language: php
|
2015-08-09 11:14:28 +00:00
|
|
|
sudo: false
|
2014-02-19 05:40:16 +00:00
|
|
|
|
2014-02-10 05:33:57 +00:00
|
|
|
php:
|
2015-09-26 16:41:59 +00:00
|
|
|
- 5.4
|
|
|
|
- 5.5
|
|
|
|
- 5.6
|
|
|
|
- nightly
|
2014-02-10 05:33:57 +00:00
|
|
|
|
|
|
|
env:
|
2015-09-26 16:41:59 +00:00
|
|
|
matrix:
|
2014-02-10 05:33:57 +00:00
|
|
|
- DB=mysql
|
2014-02-22 20:51:17 +00:00
|
|
|
- DB=pgsql
|
2015-08-09 13:37:07 +00:00
|
|
|
- DB=sqlite
|
2015-09-26 16:41:59 +00:00
|
|
|
global:
|
|
|
|
secure: rKSbYXalj/HkcomwfKup9VAAenr3Dx2HQ5Imdn8dA/9CAh403jjAWDQ93Ddzxj7pPpUVnOWGE3mN/tyuUUU7BUOEXtm1xNkuvUPMgMIfsM+OpDnTysKmM6ZFR4KIwrFqv+uipL4sCQVuAbZ6j34LRKpAMwMw0aORj0OL6qrhvfA=
|
2014-02-17 21:57:46 +00:00
|
|
|
|
2014-02-19 04:18:59 +00:00
|
|
|
install:
|
2015-09-26 16:41:59 +00:00
|
|
|
- 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
|
2014-02-19 04:02:10 +00:00
|
|
|
|
2014-02-19 04:18:59 +00:00
|
|
|
script:
|
2015-09-26 16:41:59 +00:00
|
|
|
- php install.php
|
|
|
|
- phpunit --configuration tests/phpunit.xml --coverage-clover=data/coverage.clover
|
2014-02-10 05:33:57 +00:00
|
|
|
|
2014-02-18 06:02:11 +00:00
|
|
|
after_failure:
|
2015-09-26 16:41:59 +00:00
|
|
|
- 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*
|
2014-02-18 06:02:11 +00:00
|
|
|
|
2015-09-26 16:23:52 +00:00
|
|
|
after_script:
|
2015-09-26 16:41:59 +00:00
|
|
|
- php ocular.phar code-coverage:upload --access-token=$SCI_TOKEN --format=php-clover --repository=shish/shimmie2 data/coverage.clover
|