.travis.yml 1.67 KB
Newer Older
1 2 3 4 5
language: php

php:
  - 5.3
  - 5.4
6
  - 5.5
7
  - hhvm
8

9 10
env:
  - DB=mysql
11 12 13
  - DB=pgsql POSTGRESQL_VERSION=9.1
  - DB=pgsql POSTGRESQL_VERSION=9.2
  - DB=pgsql POSTGRESQL_VERSION=9.3
14
  - DB=sqlite
15
  - DB=mysqli
16 17

before_script:
18
  - sh -c "if [ '$TRAVIS_PHP_VERSION' = 'hhvm' ]; then sudo apt-get remove --auto-remove hhvm; sudo apt-get update; sudo apt-get install -y --force-yes hhvm-nightly; fi"
19 20 21 22
  - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS doctrine_tests_tmp;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests;' -U postgres; fi"
  - sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'create database doctrine_tests_tmp;' -U postgres; fi"
23
  - sh -c "if [ '$DB' = 'pgsql' ]; then sudo service postgresql stop; sudo service postgresql start $POSTGRESQL_VERSION; fi"
24
  - sh -c "if [ '$DB' = 'mysql' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi"
25
  - sh -c "if [ '$DB' = 'mysqli' ]; then mysql -e 'create database IF NOT EXISTS doctrine_tests_tmp;create database IF NOT EXISTS doctrine_tests;'; fi"
26
  - composer --prefer-source --dev install
27 28 29

script: phpunit --configuration tests/travis/$DB.travis.xml

30 31 32
matrix:
  allow_failures:
    - php: hhvm
33 34
  exclude:
      - php: hhvm
35 36 37 38 39
        env: DB=pgsql POSTGRESQL_VERSION=9.1 # driver currently unsupported by HHVM
      - php: hhvm
        env: DB=pgsql POSTGRESQL_VERSION=9.2 # driver currently unsupported by HHVM
      - php: hhvm
        env: DB=pgsql POSTGRESQL_VERSION=9.3 # driver currently unsupported by HHVM