stryber / laravel-test-coverage-reporter
Simple tool to send test coverage reports and generate badge
Installs: 5 953
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 6
Forks: 1
Open Issues: 0
Requires
- php: ^7.4|^8.0
- ext-simplexml: *
- guzzlehttp/guzzle: ^7.0
- illuminate/config: ^8.0
- illuminate/console: ^8.0
- illuminate/support: ^8.0
- phpunit/phpunit: ^9.3.3
- symfony/process: ^5.1.4
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