code coverage for scrutinizer

This commit is contained in:
Shish 2015-09-26 17:23:52 +01:00
parent 8c1e3bc92a
commit 5947220930
2 changed files with 9 additions and 1 deletions

View File

@ -4,3 +4,6 @@ imports:
filter: filter:
excluded_paths: [lib/*,ext/tagger/script.js,ext/chatbox/*] excluded_paths: [lib/*,ext/tagger/script.js,ext/chatbox/*]
tools:
external_code_coverage: true

View File

@ -1,5 +1,6 @@
language: php language: php
sudo: false sudo: false
secure: "Td0VfHgdSGrTR96To/OScKikV/kohRclUj1AFi9m0prdFc0q/xP8jZ1EQ0qVtqwkySa9OXsekOBeiQfoqQm+e+aYH6LdBDchqtqYPzl1VAadTAPtk28M9nazl+n7Qf8ftH11WsXTl4JmbjHiwooWV8cRPUM4pQyLBc64Dg8t3vI="
php: php:
# Here is where we can list the versions of PHP you want to test against # Here is where we can list the versions of PHP you want to test against
@ -25,10 +26,11 @@ install:
- 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
script: script:
- php install.php - php install.php
- phpunit --configuration tests/phpunit.xml - phpunit --configuration tests/phpunit.xml --coverage-clover=data/coverage.clover
# If a failure occured then dump out a bunch of logs for debugging purposes. # If a failure occured then dump out a bunch of logs for debugging purposes.
after_failure: after_failure:
@ -42,6 +44,9 @@ after_failure:
- ls /var/log/postgresql - ls /var/log/postgresql
- cat /var/log/postgresql/postgresql* - cat /var/log/postgresql/postgresql*
after_script:
- php ocular.phar code-coverage:upload --access-token=$SCI_TOKEN --format=php-clover --repository=shish/shimmie2 data/coverage.clover
# configure notifications (email, IRC, campfire etc) # configure notifications (email, IRC, campfire etc)
#notifications: #notifications:
# irc: "irc.freenode.org#shimmie" # irc: "irc.freenode.org#shimmie"