tl;dr Periodically empty out the uploads directory in your WordPress dev environment to speed up PHPUnit tests. Over the past few months of working on the AMP plugin for WordPress, I’ve been noticing that PHPUnit has been running slower and slower over time. Well, today this frog jumped out of the boiling water: I decided … Continue reading Speed Up PHPUnit Tests by Emptying Uploads Directory
We use Varying Vagrant Vagrants (VVV) as the development environment for as many projects as we can. It provides a great foundation not only for developing client projects but also for core development itself.
Continue reading Running PHPUnit Tests Outside VVV
As seen previously on this blog, in Contributing to WordPress Core via GitHub and Streamlining Contributions to WordPress Core via GitHub, there are instructions for how to get a Git repo set up for committing patches for WordPress Core. These posts also include instructions for how to set up Travis CI to restrict reporting linting errors to just the scope of the changed lines … Continue reading Git pre-commit hook for WordPress development
PHPUnit tests can be really slow, especially for large plugins that integrate with external APIs. It can be tempting thus to bypass the pre-commit hook via git commit –no-verify, but then Travis CI (or Bamboo) will eventually complain and the issue will come back to you, or worse the issue will get ignored. So we … Continue reading Isolating PHPUnit tests to run