我在GitHub存储库上提出了一个拉请求。在进行PR之前,我已经用PHPUnit测试了我的代码,所有的测试都通过了。所以,我在GitHub上做了公关。但在查了我的公关后,我的公关没有通过,错误上说:
Makefile:12:目标'lint‘的配方失败
我对所有这些错误一无所知。我想如果我的PHPUnit考试成功了,我会通过特拉维斯-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.发布于 2019-07-23 17:13:57
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.https://stackoverflow.com/questions/57163590
复制相似问题