sudo: false

language: php

branches:
  except:
    - /^release-.*$/
    - /^ghgfk-.*$/

cache:
  directories:
    - $HOME/.composer/cache
 
matrix:
    allow_failures:
        - php: hhvm
matrix:
  fast_finish: true
  include:
    - php: 5.3
    - php: 5.4
    - php: 5.5
      env:
        - EXECUTE_CS_CHECK=true
    - php: 5.6
    - php: 7
    - php: hhvm 
  allow_failures:
    - php: hhvm

before_install:
  - composer self-update

install:
  - travis_retry composer install --no-interaction --ignore-platform-reqs

script:
  - ./vendor/bin/phpunit -c ./tests
  - if [[ $EXECUTE_CS_CHECK == 'true' ]]; then ./vendor/bin/phpcs --standard=PSR2 --ignore=tests/Bootstrap.php library tests ; fi
  
notifications:
  irc: "irc.freenode.org#zftalk.dev"
  email: false
