.travis.yml 2.29 KB
Newer Older
Taufan Aditya committed
1 2 3 4 5
language: php

php:
  - 5.4
  - 5.5
6
  - 5.6
7
  - hhvm
8
  - hhvm-nightly
9

10 11 12
env:
  - CUBRID_VERSION=9.3.0/CUBRID-9.3.0.0206 CUBRID_PDO_VERSION=9.2.0.0001

13
# run build against hhvm but allow them to fail
14 15
# http://docs.travis-ci.com/user/build-configuration/#Rows-That-are-Allowed-To-Fail
matrix:
DaSourcerer committed
16
  fast_finish: true
17
  allow_failures:
18 19
    - php: hhvm
    - php: hhvm-nightly
Taufan Aditya committed
20

21 22
services:
  - redis-server
23
  - memcached
24
  - elasticsearch
Carsten Brandt committed
25
  - mongodb
26

27 28 29 30 31 32 33 34 35
# faster builds on new travis setup not using sudo
sudo: false

# cache vendor dirs
cache:
  directories:
    - cubrid
    - vendor

36 37 38 39
# try running against postgres 9.3
addons:
  postgresql: "9.3"

Carsten Brandt committed
40
install:
41
  - composer self-update && composer --version
42
  - composer global require "fxp/composer-asset-plugin:1.0.0-beta1"
43
  - export PATH="$HOME/.composer/vendor/bin:$PATH"
44
# core framework:
45
  - composer install --prefer-dist
Carsten Brandt committed
46
  - tests/unit/data/travis/mongodb-setup.sh
47 48
  - tests/unit/data/travis/apc-setup.sh
  - tests/unit/data/travis/memcache-setup.sh
49
  - tests/unit/data/travis/cubrid-setup.sh
50
# codeception
51
  - composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*"
Carsten Brandt committed
52
# basic and advanced application:
Qiang Xue committed
53
  - tests/unit/data/travis/setup-apps.sh
DaSourcerer committed
54

Carsten Brandt committed
55
before_script:
56
  - echo 'elasticsearch version ' && curl http://localhost:9200/
Carsten Brandt committed
57 58
  - mysql -e 'CREATE DATABASE yiitest;';
  - psql -U postgres -c 'CREATE DATABASE yiitest;';
Carsten Brandt committed
59
  - tests/unit/data/travis/sphinx-setup.sh
60
  - mongo yii2test --eval 'db.addUser("travis", "test");'
Carsten Brandt committed
61
# basic and advanced application:
Qiang Xue committed
62
  - tests/unit/data/travis/init-apps.sh
Carsten Brandt committed
63

64
script:
65
  - vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --exclude-group mssql,oci,wincache,xcache,zenddata
66
  - |
67
    if (php --version | grep -i HipHop > /dev/null); then
68
      echo "Skipping basic application tests on HHVM"
69
    else
70 71 72 73
      cd apps/basic/web
      php -S localhost:8080 > /dev/null 2>&1 &
      cd ../tests
      codecept run
74 75 76 77 78
    fi
  - |
    if (php --version | grep -i HipHop > /dev/null); then
      echo "Skipping advanced application tests on HHVM"
    else
79
      cd apps/advanced
80 81 82
      php -S localhost:8080 > /dev/null 2>&1 &
      cd tests
      codecept run
83
    fi
84

85
after_script:
Qiang Xue committed
86
  - cd ../../..
87 88
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover