.travis.yml 1.52 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
# run build against hhvm but allow them to fail
11 12
# http://docs.travis-ci.com/user/build-configuration/#Rows-That-are-Allowed-To-Fail
matrix:
DaSourcerer committed
13
  fast_finish: true
14
  allow_failures:
15 16
    - php: hhvm
    - php: hhvm-nightly
Taufan Aditya committed
17

18 19
services:
  - redis-server
20
  - memcached
21
  - elasticsearch
Carsten Brandt committed
22
  - mongodb
23

Carsten Brandt committed
24
install:
25
  - composer self-update && composer --version
26
# core framework:
27
  - composer install --prefer-dist
Carsten Brandt committed
28
  - tests/unit/data/travis/mongodb-setup.sh
29 30
  - tests/unit/data/travis/apc-setup.sh
  - tests/unit/data/travis/memcache-setup.sh
31
  - tests/unit/data/travis/cubrid-setup.sh
Carsten Brandt committed
32
# basic and advanced application:
Qiang Xue committed
33
  - tests/unit/data/travis/setup-apps.sh
DaSourcerer committed
34

Carsten Brandt committed
35
before_script:
36
  - echo 'elasticsearch version ' && curl http://localhost:9200/
Carsten Brandt committed
37 38
  - mysql -e 'CREATE DATABASE yiitest;';
  - psql -U postgres -c 'CREATE DATABASE yiitest;';
Carsten Brandt committed
39
  - tests/unit/data/travis/sphinx-setup.sh
40
  - mongo yii2test --eval 'db.addUser("travis", "test");'
Carsten Brandt committed
41
# basic and advanced application:
Qiang Xue committed
42
  - tests/unit/data/travis/init-apps.sh
Carsten Brandt committed
43

44
script:
45
  - vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --exclude-group mssql,oci,wincache,xcache,zenddata
Qiang Xue committed
46 47 48 49
  - cd apps/basic && php vendor/bin/codecept run
  - cd ../advanced/backend && ../vendor/bin/codecept run
  - cd ../common && ../vendor/bin/codecept run
  - cd ../frontend && ../vendor/bin/codecept run
50

51
after_script:
Qiang Xue committed
52
  - cd ../../..
53 54
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover