language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - hhvm

matrix:
  allow_failures:
    - php: hhvm

sudo: false

before_script:
  - travis_retry composer require --no-update satooshi/php-coveralls:dev-master sensiolabs/security-checker:dev-master
  - travis_retry composer update --dev --no-interaction
  - git clone https://github.com/jgm/CommonMark.git spec
  - chmod a+x bin/commonmark

script:
  - mkdir -p build/logs
  - vendor/bin/phpunit -c phpunit.xml --coverage-clover build/logs/clover.xml
  - php vendor/bin/security-checker security:check composer.lock
  - cd spec && python3 test/spec_tests.py --program ../bin/commonmark

after_success:
  - composer require --no-update composer/composer:*@dev
  - composer require kzykhys/markbench:*@dev
  - vendor/bin/markbench benchmark --parser=fluxbb/commonmark --profile=blank
  - vendor/bin/markbench benchmark --parser=fluxbb/commonmark --profile=default
  - vendor/bin/markbench benchmark --parser=fluxbb/commonmark --profile=github-sample

notifications:
  webhooks:
    urls:
      - https://webhooks.gitter.im/e/b85fb5b2dfad0466dee2
    on_success: always
    on_failure: always
    on_start: false

language: php

php:
  - 5.4
  - 5.5
  - 5.6
  - hhvm

matrix:
  allow_failures:
    - php: hhvm

before_install:
  - sudo apt-get update && sudo apt-get install python3

before_script:
  - travis_retry composer require --no-update satooshi/php-coveralls:dev-master sensiolabs/security-checker:dev-master
  - travis_retry composer update --dev --no-interaction
  - git clone https://github.com/jgm/CommonMark.git spec
  - chmod a+x bin/commonmark

script:
  - mkdir -p build/logs
  - vendor/bin/phpunit -c phpunit.xml --coverage-clover build/logs/clover.xml
  - php vendor/bin/security-checker security:check composer.lock
  - cd spec && python3 test/spec_tests.py --program ../bin/commonmark

after_success:
  - composer require --no-update composer/composer:*@dev
  - composer require kzykhys/markbench:*@dev
  - vendor/bin/markbench benchmark --parser=fluxbb/commonmark --profile=blank
  - vendor/bin/markbench benchmark --parser=fluxbb/commonmark --profile=default
  - vendor/bin/markbench benchmark --parser=fluxbb/commonmark --profile=github-sample

notifications:
  webhooks:
    urls:
      - https://webhooks.gitter.im/e/b85fb5b2dfad0466dee2
    on_success: always
    on_failure: always
    on_start: false

Install Python3 on the Travis VM.
Install Python3 on the Travis VM.
