Source: www.phparch.com

Automated Refactoring With Rector
In our previous article, we discussed how to get started using code coverage to determine if our code has enough tests and one of the things I mentioned is how we should integrate this into our CI/CD pipeline but I didn’t say how. This articles exists to rectify that problem by providing you with two options to integrate code coverage into your CI/CD pipeline. The simplest way to solve this problem is to add a simple script to our repository that checks the percentage of our code coverage versus our goal percentage. To do this we first need to set up our run of PHPUnit to export a coverage file using the `–coverage-clover` command line argument. This file is an XML file that contains a line-by-line output of what files are covered by tests and which aren’t.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge. Glimpse streamlines Laravel development by seamlessly deploying GitHub pull requests to preview environments with the help of Laravel Forge.
Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Shirts painstakingly handcrafted by under-caffeinated developers. Shirts painstakingly handcrafted by under-caffeinated developers.
Community Partners