Today we’re going to cover how to combine concepts from unit testing best practices and Github Actions so that we’re running our tests automatically with Github actions when pushing new code to the repository.
Why should developers ship features a bit slower as they take time to write tests? It’s simple. Tested code is good code. Start viewing testing practices as an investment instead of an expense to your business.
While you can find lots of content about unit testing PHP applications, there aren’t many people talking about unit testing specifically for WordPress. There is precious little written about where to start for developers that are ready to increase their code quality and want to learn how to add tests to their work.
Automating your WordPress deployment, and taking the time to get it right, means you never accidentally overwrite the wrong files, put the wrong files in the wrong directory, or make any other of the many mistakes I’ve made moving files around in the 12 years I’ve been building sites. A day or two of time spent configuring deployment for your first time is worth saving that pain.
AutomateWoo is built specifically for WooCommerce; to automate your customer interactions completely inside your WordPress admin interface. This means that it has fairly deep hooks into WooCommerce that you can leverage.
Even if you’re the only person working on a project, using Git and a Git workflow will help you keep your projects organized. You won’t need to press CTRL + Z until you’ve reset your work after writing code that didn’t work. You’ll be able to trust your system and keep producing work for your projects.
By using Git to manage your client projects, you will save yourself headaches since you can roll back changes or discard entire branches if you no longer want the work you’ve done. No more Ctrl + Z until you think you’ve rolled back far enough, Git will keep track of it all for you.