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:
13
13
directories :
14
14
- $HOME/.composer/cache
15
15
16
- php :
17
- - 7.0
18
- - nightly
19
-
20
16
matrix :
17
+ include :
18
+ - php : 7
19
+ env : cov=1
20
+ - php : 7
21
+ env : deps=low
22
+ - php : nightly
21
23
allow_failures :
22
24
- php : nightly
23
25
fast_finish : true
30
32
depth : 1
31
33
32
34
install :
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
34
37
35
38
before_script :
36
39
- mysql -u root -e 'create database telegrambot; use telegrambot; source ./vendor/longman/telegram-bot/structure.sql;'
37
40
38
41
script :
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
45
44
46
45
after_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
48
47
49
48
env :
50
49
global :
Original file line number Diff line number Diff line change 21
21
"php" : " ^7.0" ,
22
22
"longman/telegram-bot" : " ^0.35"
23
23
},
24
+ "require-dev" : {
25
+ "phpunit/phpunit" : " ^5.5" ,
26
+ "jakub-onderka/php-parallel-lint" : " ^0.9"
27
+ },
24
28
"autoload" : {
25
29
"psr-4" : {
26
30
"NPM\\ TelegramBotManager\\ " : " src"
31
35
"NPM\\ TelegramBotManager\\ Tests\\ " : " tests/TelegramBotManager/Tests"
32
36
}
33
37
},
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
+ ]
37
47
}
38
48
}
You can’t perform that action at this time.
0 commit comments