forked from shogodev/argilla
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
44 lines (37 loc) · 1.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
language: php
php:
- 5.4
- 5.5
- 5.6
- 7.0
# - hhvm
# - hhvm-nightly
services:
- mysql
#before_install:
# - pear channel-discover pear.phing.info
# - pear install phing/phing
# - phpenv rehash
install:
- cd .. && git clone https://github.com/yiisoft/yii.git yii
- cd yii && git checkout 1.1.17
- cd ../argilla
- wget http://www.phing.info/get/phing-latest.phar
- chmod +x phing-latest.phar
- sudo mv phing-latest.phar phing.phar
before_script:
- mysql -e "GRANT ALL PRIVILEGES ON *.* TO 'prog'@'localhost' IDENTIFIED BY '123' WITH GRANT OPTION;" -uroot
- php phing.phar bootstrap -DdbName=argilla -DdbTablePrefix=argilla_ -DdbUser=prog -DdbPassword=123 -Dconfirm=y -DconfirmTest=y
script:
- phpunit -c backend/protected/tests/phpunit.xml backend/protected/tests/unit/
- phpunit -c protected/tests/phpunit.xml protected/tests/unit/
- if [ $(phpenv version-name) = "5.4" ]; then
phpunit -c backend/protected/tests/coverage.xml --coverage-clover=build/coverage/backend.xml backend/protected/tests/unit/;
phpunit -c protected/tests/coverage.xml --coverage-clover=build/coverage/frontend.xml protected/tests/unit/;
fi
after_script:
- if [ $(phpenv version-name) = "5.4" ]; then
wget https://scrutinizer-ci.com/ocular.phar;
php ocular.phar code-coverage:upload --format=php-clover build/coverage/backend.xml;
php ocular.phar code-coverage:upload --format=php-clover build/coverage/frontend.xml;
fi