GithubHelp home page GithubHelp logo

codeclimate-php-test-reporter's Introduction

Code Climate Build Status

codeclimate-test-reporter

Collects test coverage data from your PHP test suite and sends it to Code Climate's hosted, automated code review service.

Code Climate - https://codeclimate.com

Installation

This package requires a user, but not necessarily a paid account, on Code Climate, so if you don't have one the first step is to signup at: https://codeclimate.com.

To install php-test-reporter with Composer first add the following to your composer.json file:

composer.json

{
  "require-dev": {
    "codeclimate/php-test-reporter": "dev-master"
  }
}

Then, run:

$ php composer.phar install --dev

If adding the test-reporter to an existing project, run:

$ php composer.phar update codeclimate/php-test-reporter --dev

Usage

  • Generate coverage data to build/logs/clover.xml

Add the following to phpunit.dist.xml:

<?xml version="1.0" encoding="UTF-8"?>
<phpunit ...>
  <logging>
    ...
    <log type="coverage-clover" target="build/logs/clover.xml"/>
    ...
  </logging>
</phpunit>

Or invoke phpunit as follows:

$ phpunit --coverage-clover build/logs/clover.xml
  • Specifying your repo token as an environment variable, invoke the test-reporter:
$ CODECLIMATE_REPO_TOKEN="..." vendor/bin/test-reporter

The CODECLIMATE_REPO_TOKEN value is provided after you add your repo to your Code Climate account by clicking on "Setup Test Coverage" on the right hand side of your feed.

Please contact [email protected] if you need any assistance setting this up.

Contributions

Patches, bug fixes, feature requests, and pull requests are welcome on the GitHub page for this project:

https://github.com/codeclimate/php-test-reporter

This package is maintained by Bryan Helmkamp ([email protected]).

Copyright

See LICENSE.txt

Portions of the implementation were inspired by the php-coveralls project.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.