language: php

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

sudo: false

services:
  - memcached

before_script:
  - sh -c 'if [ "$TRAVIS_PHP_VERSION" != "hhvm" ]; then echo "extension = memcache.so" >> ~/.phpenv/versions/$(phpenv version-name)/etc/php.ini; fi;'
  - (composer self-update; true)
  - composer require satooshi/php-coveralls dev-master
  - composer require doctrine/cache ~1.2
  - composer install

script:
  - ./vendor/phpunit/phpunit/phpunit --coverage-clover clover.xml

after_script:
  - php vendor/bin/coveralls -v

notifications:
  slack:
    rooms:
      - piwik:3HWhNh21qPfDACQXTrJOb0mW#device-detector
      - piwikpro:7OABSbDrywSTo2nv9lD2svXG

  irc:
    skip_join: true
    on_success: change
    channels:
      - "irc.freenode.org#piwik-dev"
    template:
      - "%{repository} (%{commit}) : %{message} %{foo} "
      - "Device Detector Build details: %{build_url}"
