PHP Create Badges: Create badges for project coverage

Recommend this page to a friend!
  Info   View files Example   View files View files (5)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2021-05-29 (16 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 22 This week: 2All time: 10,263 This week: 118Up
Version License PHP version Categories
badger 1.0MIT/X Consortium ...5PHP 5, Graphics, Project Management
Description Author

This package can create badges for project coverage.

It can read a code coverage report in Clover XML format to extract the coverage value.

The package can generage a JSON definition for a badge from the coverage value and sends a HTTP request to the Shields.io API to generate the badge for the project.

Innovation Award
PHP Programming Innovation award nominee
May 2021
Nominee
Vote
Badges are a nice way to show certain metrics about the packages in a graphical way.

This package can generate badges using the Shields.io service. The badges can show the level of test coverage of a package using coverage tools that generate reports in Clover XML format.

Manuel Lemos
Picture of Yousaf Syed
  Performance   Level  
Name: Yousaf Syed <contact>
Classes: 6 packages by
Country: Pakistan Pakistan
Age: 30
All time rank: 240732 in Pakistan Pakistan
Week rank: 60 Up2 in Pakistan Pakistan Up
Innovation award
Innovation award
Nominee: 4x

Winner: 1x

 

Details

badger

Badger is a small CLI utility for generating a shields.io compatible JSON from clover.xml report and uploading it to a badger-server, see github.com/crowphp/badger-server to read more about the server.

Installing badger from composer

composer require --dev crowphp/badger:dev-master

Notice: At the moment the badger is under development use it with caution.

Usage

Help Document

$ php vendor/bin/badger --help
Console Tool

Usage:
  command [options] [arguments]

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Available commands:
  help             Displays help for a command
  list             Lists commands
 upload
  upload:coverage  Creates json for coverage badge shields.io and uploads it to a given badger server

Create badge schema on a badger server for a given branch

$ php upload:coverage <server> <branch> <secret-key>

Description:
  Creates json for coverage badge shields.io and uploads it to a given badger server

Usage:
  upload:coverage <server> <branch> <secret-key>

Arguments:
  server                URL for Badger Server
  branch                The branch name for the coverage
  secret-key            Secret api key for badger server

Options:
  -h, --help            Display help for the given command. When no command is given display help for the list command
  -q, --quiet           Do not output any message
  -V, --version         Display this application version
      --ansi            Force ANSI output
      --no-ansi         Disable ANSI output
  -n, --no-interaction  Do not ask any interactive question
  -v|vv|vvv, --verbose  Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

  Files folder image Files  
File Role Description
Files folder imagesrc (1 directory)
Accessible without login Plain text file badger Example Example script
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files  /  src  
File Role Description
Files folder imageBadger (1 directory)

  Files folder image Files  /  src  /  Badger  
File Role Description
Files folder imageCommands (1 file)

  Files folder image Files  /  src  /  Badger  /  Commands  
File Role Description
  Plain text file CoverageBadge.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:22
This week:2
All time:10,263
This week:118Up

For more information send a message to info at phpclasses dot org.