.travis.yml 2.23 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
  - export PATH="$HOME/.composer/vendor/bin:$PATH"
43
# core framework:
44
  - composer install --prefer-dist
Carsten Brandt committed
45
  - tests/unit/data/travis/mongodb-setup.sh
46 47
  - tests/unit/data/travis/apc-setup.sh
  - tests/unit/data/travis/memcache-setup.sh
48
  - tests/unit/data/travis/cubrid-setup.sh
49
# codeception
50
  - composer global require "codeception/codeception=2.0.*" "codeception/specify=*" "codeception/verify=*"
Carsten Brandt committed
51
# basic and advanced application:
Qiang Xue committed
52
  - tests/unit/data/travis/setup-apps.sh
DaSourcerer committed
53

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

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

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