stryber/laravel-test-coverage-reporter

Simple tool to send test coverage reports and generate badge

v1.0.8 2021-04-05 14:39 UTC

This package is auto-updated.

Last update: 2024-05-05 21:42:00 UTC


README

Installation

Use composer to install:

composer require stryber/laravel-test-coverage-reporter

Publish the config file:

php artisan vendor:publish --tag="stryber-coverage-reporter"

Be sure to set URL of the service you are going to send coverage report

'service_url' => env('TEST_COVERAGE_REPORTER_SERVICE_URL', '')

Use: php artisan coverage:report {RepositoryName} {--badge}

Under the hood it will run php artisan test printing out status to console, so there is no need to run tests separately.

RepositoryName is the name of your repo. When using Github Actions, you can use the default variable GITHUB_REPOSITORY.

If passed --badge, coverage badge will be generated in the root of the app, namedcoverage.svg