Makefile:12:目标“棉绒”的配方失败

时间:2019-07-23 11:49:50

标签: php phpunit travis-ci

我正在GitHub存储库上发出请求请求。在进行PR之前,我已经使用PHPUnit测试了我的代码,并且所有测试都通过了。因此,我在GitHub上进行了PR。但是在travis-ci检查我的PR后,我的PR没有通过,错误提示:

  

Makefile:12:目标“棉绒”的配方失败

我不知道所有这些错误。我认为,如果我的PHPUnit测试成功,那么我将通过travis-ci检查。但不幸的是没有。

我遇到了一些错误

sebastian/global-state suggests installing ext-uopz (*)
phpunit/phpunit suggests installing phpunit/php-invoker (~1.1)
[32mGenerating optimized autoload files[39m
travis_time:end:2e276f14:start=1563869333859320964,finish=1563869405903083472,duration=72043762508
[0Ktravis_fold:end:install
[0Ktravis_time:start:113ef200
[0K$ make lint
php /home/travis/build/cloudflare/cloudflare-php/vendor/bin/php-cs-fixer fix --config=/home/travis/build/cloudflare/cloudflare-php/.php_cs --dry-run
Loaded config [33mdefault[39m from "/home/travis/build/cloudflare/cloudflare-php/.php_cs".
   1) cloudflare-php/src/Endpoints/Zones.php
   2) cloudflare-php/tests/Endpoints/ZonesTest.php

Checked all files in 0.893 seconds, 14.000 MB memory used
Makefile:12: recipe for target 'lint' failed
make: *** [lint] Error 8
travis_time:end:113ef200:start=1563869405907430819,finish=1563869407016751613,duration=1109320794
[0K[31;1mThe command "make lint" exited with 2.[0m

travis_time:start:0ca9e138
[0K$ make test
php /home/travis/build/cloudflare/cloudflare-php/vendor/bin/phpunit --configuration /home/travis/build/cloudflare/cloudflare-php/phpunit.xml
PHPUnit 5.7.5 by Sebastian Bergmann and contributors.

...............................................................  63 / 120 ( 52%)
.........................................................       120 / 120 (100%)

Time: 8.69 seconds, Memory: 10.00MB

OK (120 tests, 720 assertions)
travis_time:end:0ca9e138:start=1563869407021249545,finish=1563869415802590423,duration=8781340878
[0K[32;1mThe command "make test" exited with 0.[0m


Done. Your build exited with 1.

1 个答案:

答案 0 :(得分:0)

CI / CD管道将为您的构建添加一个抽象层。 在本地运行测试,它应该为您输出提示=)

$ php ./vendor/bin/phpmd tests/ text cleancode,codesize,controversial,design,naming,unusedcode
/Repos/cloudflare-php/tests/Endpoints/ZonesTest.php:9   The class ZonesTest has 11 public methods. Consider refactoring ZonesTest to keep number of public methods under 10.