Download the PHP package orbeji/phpunit-pr-coverage-check without Composer

On this page you can find all versions of the php package orbeji/phpunit-pr-coverage-check. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package phpunit-pr-coverage-check


Phpunit PR Coverage Check

Report Bug · Request Feature

Tests Static analysis Symfony & php compatibility

About The Project

Inspired by https://github.com/richardregeer/phpunit-coverage-check

This project is a console command that filters the coverage report of your Phpunit tests to only take into account the modifications of a PullRequest, so you can be sure that the PR has enough tests.

(back to top)

Getting Started

Installation

Make sure Composer is installed globally, as explained in the installation chapter of the Composer documentation.

Open a command console, enter your project directory and execute:

Usage

There are two ways of using this command:

With the first option you need to generate the appropiate diff file to pass to the command. The diff file must only contain the modified files/lines of the pr. To do that you can call git diff DESTINATION_BRANCH...PR_BRANCH > diff.txt with Bitbucket and GitHub you have environment variables to know the current and destination branches.

Diff file example: Bitbucket

GitHub

Git repo information

The API token must have permissions to the PullRequest scope.

For GitHub in the workspace option put the owner of the repo.

In any case if the coverage is not met the command will return the covered percentage

Reports

When executing the command line you can pass the option --report to generate a table with the uncovered lines of the PR

This option accepts 3 values:

Examples:

ansi:

comment: report:

CI Integration

Bitbucket Pipelines

GitHub Actions

Roadmap

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate and that all the GitHub Actions are passing.

(back to top)

License

Distributed under the MIT License.

(back to top)

Contact

Project Link: https://github.com/orbeji/phpunit-pr-coverage-check

(back to top)


All versions of phpunit-pr-coverage-check with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2
ext-json Version *
ext-simplexml Version *
composer-runtime-api Version ^2.2
mashape/unirest-php Version ^3.0
ptlis/diff-parser Version ^1.0.2
symfony/console Version ^5.4.36
symfony/polyfill-php83 Version *
symfony/polyfill-uuid Version ^1.29.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package orbeji/phpunit-pr-coverage-check contains the following files

Loading the files please wait ....