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

php:
  - 5.4
  - 5.5
6
  - 5.6
7 8 9 10 11 12 13 14
  - hhvm

# 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:
  allow_failures:
    - php: hhvm
    - php: 5.6
Taufan Aditya committed
15

16 17
services:
  - redis-server
18
  - memcached
19
  - elasticsearch
Carsten Brandt committed
20
  - mongodb
21

Carsten Brandt committed
22
install:
23
  - composer self-update && composer --version
24
# core framework:
25
  - composer install --prefer-dist
Carsten Brandt committed
26
  - tests/unit/data/travis/mongodb-setup.sh
27 28
  - tests/unit/data/travis/apc-setup.sh
  - tests/unit/data/travis/memcache-setup.sh
29
  - tests/unit/data/travis/cubrid-setup.sh
30 31
# basic application:
  - composer install --dev --prefer-dist -d apps/basic
32
  - cd apps/basic && composer require --dev codeception/codeception:1.8.*@dev codeception/specify:* codeception/verify:*
33
  - php vendor/bin/codecept build && cd ../..
Carsten Brandt committed
34
  - cd apps && php -S localhost:8080 &
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
script:
44
  - vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --exclude-group mssql,oci,wincache,xcache,zenddata
45
  - cd apps/basic && php vendor/bin/codecept run
46

47 48 49
after_script:
  - wget https://scrutinizer-ci.com/ocular.phar
  - php ocular.phar code-coverage:upload --format=php-clover coverage.clover