language: php

php:
  - 5.3
  - 5.4
  - 5.5
  - 5.6
  - hhvm

before_script:
  - composer self-update
  - composer install --dev --prefer-source;
  - wget https://scrutinizer-ci.com/ocular.phar
  - mysql -e "create database IF NOT EXISTS zfc_user;" -uroot

script:
  - ./vendor/bin/phpunit --bootstrap=tests/bootstrap.php
  - ./vendor/bin/phpcs -n --standard=PSR2 ./src/ ./tests/

after_script:
  - php ocular.phar code-coverage:upload --format=php-clover build/logs/clover.xml

notifications:
  email: false
  irc: "irc.freenode.org#zftalk.dev"

matrix:
  fast_finish: true
  allow_failures:
    - php: 5.6
    - php: hhvm
