2014-08-12 16:40:21 -04:00
|
|
|
language: php
|
|
|
|
|
|
|
|
php:
|
2014-08-13 15:57:24 -04:00
|
|
|
- 5.4
|
2014-08-12 16:40:21 -04:00
|
|
|
- 5.5
|
|
|
|
- 5.6
|
|
|
|
- hhvm
|
|
|
|
|
|
|
|
install:
|
2014-08-13 15:57:24 -04:00
|
|
|
- composer install --dev --no-progress
|
2014-08-12 16:40:21 -04:00
|
|
|
|
|
|
|
env:
|
2014-08-12 19:25:37 -04:00
|
|
|
- DB=mysql
|
|
|
|
- DB=pgsql
|
2014-08-12 16:40:21 -04:00
|
|
|
|
|
|
|
before_script:
|
|
|
|
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS todo_test;' -U postgres; fi"
|
|
|
|
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database todo_test;' -U postgres; fi"
|
|
|
|
- sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS todo_test;'; fi";
|
|
|
|
|
|
|
|
script:
|
|
|
|
- vendor/bin/phinx migrate -e testing -c tests/phinx/$DB.yml
|
|
|
|
- mkdir -p build/logs
|
|
|
|
- cd tests && phpunit --coverage-clover build/logs/clover.xml
|
|
|
|
|
|
|
|
after_script:
|
|
|
|
- wget https://scrutinizer-ci.com/ocular.phar
|
2014-08-12 17:06:51 -04:00
|
|
|
- php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
exclude:
|
|
|
|
- php: hhvm
|
2014-08-12 19:25:37 -04:00
|
|
|
env: DB=pgsql
|
2014-08-12 17:06:51 -04:00
|
|
|
allow_failures:
|
|
|
|
- php: hhvm
|
|
|
|
fast_finish: true
|