diff --git a/.travis.yml b/.travis.yml index d5e85da1f02..8ee99cbc086 100644 --- a/.travis.yml +++ b/.travis.yml @@ -79,14 +79,17 @@ before_script: script: - | - vendor/bin/codecept run unit; -#script: -# - | -# # if [[ $TASK_TESTS_COVERAGE != 1 ]]; then -# php -d display_errors=on -d max_execution_time=-1 -d memory_limit=2048M -d error_reporting=-1 vendor/codeception/codeception/codecept run tests/unit/helpers/ArrayHelperTest.php:testToArray; -# # else -# # vendor/bin/codecept run unit --coverage --coverage-xml; -# # fi + if [[ $TASK_TESTS_COVERAGE != 1 ]]; then + vendor/bin/codecept run unit + else + vendor/bin/codecept run unit --coverage --coverage-xml; + fi + +after_script: + - | + if [ $TASK_TESTS_COVERAGE == 1 ]; then + travis_retry php vendor/bin/php-coveralls + fi #after_script: # - | @@ -95,6 +98,14 @@ script: # php ocular.phar code-coverage:upload --format=php-clover coverage.clover # fi +#script: +# - | +# # if [[ $TASK_TESTS_COVERAGE != 1 ]]; then +# php -d display_errors=on -d max_execution_time=-1 -d memory_limit=2048M -d error_reporting=-1 vendor/codeception/codeception/codecept run tests/unit/helpers/ArrayHelperTest.php:testToArray; +# # else +# # vendor/bin/codecept run unit --coverage --coverage-xml; +# # fi + #jobs: # include: # - stage: Static Code Analysis diff --git a/composer.json b/composer.json index bd683f774a6..e489e4dddae 100644 --- a/composer.json +++ b/composer.json @@ -58,7 +58,8 @@ "codeception/verify": "^1.0", "vlucas/phpdotenv": "^3.0", "league/factory-muffin": "^3.0", - "fzaninotto/faker": "^1.8" + "fzaninotto/faker": "^1.8", + "php-coveralls/php-coveralls": "^2.1" }, "provide": { "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*",