forked from yiisoft/yii2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
69 lines (62 loc) · 2.48 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
language: php
php:
- 5.4
- 5.5
- 5.6
- 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:
fast_finish: true
allow_failures:
- php: hhvm
- php: 5.6
services:
- redis-server
- memcached
- elasticsearch
- mongodb
install:
- composer self-update && composer --version
# core framework:
- composer install --prefer-dist
- tests/unit/data/travis/mongodb-setup.sh
- tests/unit/data/travis/apc-setup.sh
- tests/unit/data/travis/memcache-setup.sh
- tests/unit/data/travis/cubrid-setup.sh
# basic application:
- composer install --dev --prefer-dist -d apps/basic
- cd apps/basic && composer require --dev codeception/codeception:1.8.*@dev codeception/specify:* codeception/verify:*
- php vendor/bin/codecept build && cd ../..
# advanced application:
- composer install --dev --prefer-dist -d apps/advanced
- cd apps/advanced && composer require --dev codeception/codeception:1.8.*@dev codeception/specify:* codeception/verify:*
- ./init --env=Development
- sed -i s/root/travis/ common/config/main-local.php
- cd backend && php ../vendor/bin/codecept build
- cd ../common && php ../vendor/bin/codecept build
- cd ../frontend && php ../vendor/bin/codecept build && cd ../../..
# boot server
- cd apps && php -S localhost:8080 > /dev/null 2>&1 &
before_script:
- echo 'elasticsearch version ' && curl http://localhost:9200/
- mysql -e 'CREATE DATABASE yiitest;';
- psql -U postgres -c 'CREATE DATABASE yiitest;';
- tests/unit/data/travis/sphinx-setup.sh
- mongo yii2test --eval 'db.addUser("travis", "test");'
- mysql -e 'CREATE DATABASE yii2_advanced_acceptance;';
- mysql -e 'CREATE DATABASE yii2_advanced_functional;';
- mysql -e 'CREATE DATABASE yii2_advanced_unit;';
- cd apps/advanced/frontend/tests/acceptance && php yii migrate --interactive=0
- cd ../functional && php yii migrate --interactive=0
- cd ../unit && php yii migrate --interactive=0 && cd ../../../../..
script:
- vendor/bin/phpunit --verbose --coverage-clover=coverage.clover --exclude-group mssql,oci,wincache,xcache,zenddata
- 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
after_script:
- cd ../../..
- wget https://scrutinizer-ci.com/ocular.phar
- php ocular.phar code-coverage:upload --format=php-clover coverage.clover