sudo: false

language: php

php:
  - '5.3'
  - '5.4'
  - '5.5'
  - '5.6'
  - '7.0'

notifications:
  email:
    on_success: change
    on_failure: change

before_script:
  # PHP_CodeSniffer
  - curl -L -o phpcs.phar https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
  # PHPUnit - manually download old version so that it works on PHP 7
  - curl -L -o phpunit.phar https://phar.phpunit.de/phpunit-4.8.35.phar
  # Basic config required for PHPUnit
  - cp qa-tests/phpunit-qa-config.php qa-config.php

script:
  # PHP_CodeSniffer
  - php phpcs.phar --report=emacs --extensions=php --standard=qa-tests/phpcs/ruleset.xml .
  # PHPUnit
  - php phpunit.phar --bootstrap qa-tests/autoload.php qa-tests
