As you may have heard, WordPress 5.5 introduces a User Interface (UI) for toggling automatic plugin and theme updates. The underlying functionality has actually existed in WordPress since automatic core updates were introduced way back in WordPress 3.7, but for the first time WordPress core is shipping with a user interface for controlling what gets updated.
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.
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.
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.
Grow your online business faster with news, tips, strategies, and inspiration.