networkrailbusinesssystems/badges 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

networkrailbusinesssystems/badges

最新稳定版本:1.5.0

Composer 安装命令:

composer require networkrailbusinesssystems/badges

包简介

Generate readme badges during your pre-push

README 文档

README

Generate badges as part of your pre-push hooks!

Installation

  1. Add networkrailbusinesssystems/badges to your Composer dev dependencies
composer require --dev networkrailbusinesssystems/badges
  1. Ensure that PHPUnit outputs logs and coverage with the following settings:
<coverage>
    <report>
        <html outputDirectory=".phpunit.cache/html" />
        <text outputFile=".phpunit.cache/coverage.txt" showUncoveredFiles="false" showOnlySummary="true" />
    </report>
</coverage>
<logging>
    <junit outputFile=".phpunit.cache/tests.xml" />
</logging>
  1. Add the following commands to the pre-push hook:
php vendor/networkrailbusinesssystems/badges/badges.php
git add .github/*.svg
git diff-index --quiet --cached HEAD || git commit -m "Updated badges" --no-verify
  1. Add the following lines to readme.md, excluding badges as required:
![Composer status](.github/composer.svg)
![Coverage status](.github/coverage.svg)
![Frontend version](.github/frontend.svg)
![Laravel version](.github/laravel.svg)
![NPM status](.github/npm.svg)
![PHP version](.github/php.svg)
![Tests status](.github/tests.svg)
![Views status](.github/views.svg)

Debug driver

You must have either xdebug or PCOV installed to run coverage checks, and enable the coverage mode.

PCOV is generally newer and faster than XDebug, however it may not be as accurate.

XDebug

  1. sudo apt install php-xdebug
  2. Add the following to the end of your php.ini:
[xdebug]
xdebug.mode=coverage

PCOV

  1. sudo apt install php8.2-dev
  2. sudo apt install php-pear
  3. sudo pecl install pcov
  4. Add the following to the end of your php.ini:
[pcov]
extension=pcov.so

Usage

  1. Run git push as normal
  2. The pre-push hooks will fire, running your tests and coverage
  3. The badges will automatically generate, update, and be added to the commit

Views status

Use the AssertsViewsRender trait and extension in the LaravelTestingTraits library to enable tracking the status of rendered views.

统计信息

  • 总下载量: 9.06k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 11
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-01-09

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固