File tree Expand file tree Collapse file tree 3 files changed +73
-95
lines changed Expand file tree Collapse file tree 3 files changed +73
-95
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,13 @@ cache:
1313 directories :
1414 - $HOME/.composer/cache
1515
16- php :
17- - 7.0
18- - nightly
19-
2016matrix :
17+ include :
18+ - php : 7
19+ env : cov=1
20+ - php : 7
21+ env : deps=low
22+ - php : nightly
2123 allow_failures :
2224 - php : nightly
2325 fast_finish : true
3032 depth : 1
3133
3234install :
33- - travis_retry composer install --prefer-dist --no-interaction
35+ - if [ "$deps" == "low" ]; then travis_retry composer update --prefer-source --prefer-lowest --prefer-stable --no-interaction; fi
36+ - if [ "$deps" != "low" ]; then travis_retry composer install --prefer-source --no-interaction; fi
3437
3538before_script :
3639 - mysql -u root -e 'create database telegrambot; use telegrambot; source ./vendor/longman/telegram-bot/structure.sql;'
3740
3841script :
39- - |
40- if [[ "$TRAVIS_PHP_VERSION" == "7.0" ]] ; then
41- ./vendor/bin/phpunit --coverage-clover=coverage.xml
42- else
43- ./vendor/bin/phpunit
44- fi
42+ - if [[ "$cov" == "1" ]] ; then composer test-cov; fi
43+ - if [[ "$cov" != "1" ]] ; then composer test; fi
4544
4645after_success :
47- - if [[ "$TRAVIS_PHP_VERSION " == "7.0 " ]]; then bash <(curl -s https://codecov.io/bash); fi
46+ - if [[ "$cov " == "1 " ]]; then bash <(curl -s https://codecov.io/bash); fi
4847
4948env :
5049 global :
Original file line number Diff line number Diff line change 2121 "php" : " ^7.0" ,
2222 "longman/telegram-bot" : " ^0.35"
2323 },
24+ "require-dev" : {
25+ "phpunit/phpunit" : " ^5.5" ,
26+ "jakub-onderka/php-parallel-lint" : " ^0.9"
27+ },
2428 "autoload" : {
2529 "psr-4" : {
2630 "NPM\\ TelegramBotManager\\ " : " src"
3135 "NPM\\ TelegramBotManager\\ Tests\\ " : " tests/TelegramBotManager/Tests"
3236 }
3337 },
34- "require-dev" : {
35- "phpunit/phpunit" : " ^5.5" ,
36- "squizlabs/php_codesniffer" : " ^2.7"
38+ "scripts" : {
39+ "test" : [
40+ " parallel-lint . --exclude vendor" ,
41+ " phpunit"
42+ ],
43+ "test-cov" : [
44+ " parallel-lint . --exclude vendor" ,
45+ " phpunit --coverage-clover=coverage.xml"
46+ ]
3747 }
3848}
You can’t perform that action at this time.
0 commit comments