language: php

php:
    - 5.5
    - 5.6
    - hhvm

env:
    - SYMFONY_VERSION=2.3.*

before_script:
    - composer require symfony/symfony:${SYMFONY_VERSION} --no-interaction --prefer-source --dev

script:
    - phpunit --coverage-text
    - phantomjs Resources/js/run-qunit.js file://`pwd`/Resources/js/index.html
    - phantomjs Resources/js/run-qunit.js file://`pwd`/Resources/js/index-with-es5-shim.html

matrix:
    allow_failures:
        - env: SYMFONY_VERSION=dev-master
        - php: hhvm
    include:
      - php: 5.6
        env: SYMFONY_VERSION=2.5.*
      - php: 5.6
        env: SYMFONY_VERSION=2.6.*
      - php: 5.6
        env: SYMFONY_VERSION=dev-master
      - php: hhvm
        env: SYMFONY_VERSION=dev-master
