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

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners