leadersleague / phpunit-check-coverage
在您的流水线中设置最低可接受的代码覆盖率
1.0.0
2020-01-23 13:43 UTC
Requires
- ext-simplexml: *
Requires (Dev)
- phpunit/phpunit: ^7.5
This package is auto-updated.
Last update: 2024-09-23 23:59:31 UTC
README
简短描述
在您的流水线中设置最低可接受的代码覆盖率
安装
使用composer,要求
composer require leadersleague/phpunit-check-coverage
使用
运行具有指定覆盖率的单元测试
php bin/phpunit -c phpunit.xml.dist --coverage-clover coverage.xml
运行覆盖率报告分析,如果覆盖率超过限制则成功
php bin/coverage coverage.xml 80
其中80是最低覆盖率百分比。
由以下人员开发和维护
许可证
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://apache.ac.cn/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.