language: php
php:
  - 5.2
  - 5.3
  - 5.4
  - 5.5

env:
  - DB=mysql

before_script:
  - git clone git://github.com/YOURLS/YOURLS-unit-tests.git tests
  - git clone git://github.com/ozh/YOURLS-fr_FR.git user/languages/fr
  - cp user/languages/fr/fr_FR.* user/languages
  - mysql -e 'create database IF NOT EXISTS yourls_tests;'
  - cp tests/yourls-tests-config-travis.php user/config.php

script: phpunit --configuration ./tests/phpunit-travis.xml.dist

after_script: rm user/config.php

notifications:
  email: false
  irc:
    channels:
      - "irc.freenode.org#YOURLS"
    use_notice: true
