.travis.yml 1.54 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

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

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

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

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

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

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