build:
  environment:
          php: '5.6.9'

  tests:
    override:
      -
        command: 'vendor/bin/phpspec run -c ci/phpspec-with-coverage.yml -vvv'
        coverage:
          file: 'coverage.clover'
          format: 'php-clover'
      -
        command: 'vendor/bin/phpunit'
      -
        command: 'phpenv global hhvm && vendor/bin/phpspec run -vvv'
      -
        command: 'phpenv global hhvm vendor/bin/phpunit'
      -
        command: 'phpenv global 7.0.0 && vendor/bin/phpspec run -vvv'
      -
        command: 'phpenv global 7.0.0 vendor/bin/phpunit'


tools:
    php_code_sniffer:
        config:
            standard: "PSR2"
    sensiolabs_security_checker: true
    php_mess_detector:
        config:
            ruleset: ci/phpmd.xml

checks:
    php:
        code_rating: true
        duplication: true

build_failure_conditions:
    - 'issues.label("coding-style").exists'
    - 'issues.severity(>= MINOR).exists'
    - 'project.metric("scrutinizer.quality", < 7)'
    - 'project.metric("scrutinizer.test_coverage", < 0.95)'

filter:
    excluded_paths:
        - tests/performance/*
