Ok, so, let us talk a minute about CI/CD. What it is, how it can benefit you and how to to incorporate it into your existing workflow.
Topic 1.
What it is.
Continuous Integration / Continuous Deployment
Well, what it is, kinda depends on what you need lol... I'm not trying to be sly here, it really is that simple. How much automation, as far as, code analysis/testing do you want to automate in your project? I was very fortunate in the fact that Laminas makes it very easy to incorporate Ci/Cd into your pipeline using some of the tools they have developed for their own projects! They have provided Github actions for several things. PhpCodesniffer and Psalm is just two that comes to mind. I however do not use Psalm, I use Phpstan for static analysis. But, guess what. The action still just works . So, back to what it is. Ci/Cd is a generic terminology that is used for automating part of your development operations. Such as when your contributors (or in house team members) open pull request against a target repo.
What if you could provide a given set of tools that would run against the repo instead of teaching each new contributor/developer how to setup and configure each tool on their local development server instance? Well, this is exactly what the Github actions do for you. You can configure said action to do so many things. As an example, say you want to test that your app will run on php 7.4, 8.0, 8.1 and 8.2. Well, you can do that.
What if, you want the code to meet your coding standard, as is its formatting, before you allow a pull request to be merged? Well, you can do that too.
What if, you want to run Phpstan or Psalm against the entire repo, and it pass, before you merge that contributor / developer pull request? Well, yes, you can do that as well.
Matter of fact, you can do all of these things in a single streamlined manner using Github actions!!!
In my next post I will post up a general approach for how to integrate the github actions into your workflow, some example actions etc.
Topic 1.
What it is.
Continuous Integration / Continuous Deployment
Well, what it is, kinda depends on what you need lol... I'm not trying to be sly here, it really is that simple. How much automation, as far as, code analysis/testing do you want to automate in your project? I was very fortunate in the fact that Laminas makes it very easy to incorporate Ci/Cd into your pipeline using some of the tools they have developed for their own projects! They have provided Github actions for several things. PhpCodesniffer and Psalm is just two that comes to mind. I however do not use Psalm, I use Phpstan for static analysis. But, guess what. The action still just works . So, back to what it is. Ci/Cd is a generic terminology that is used for automating part of your development operations. Such as when your contributors (or in house team members) open pull request against a target repo.
What if you could provide a given set of tools that would run against the repo instead of teaching each new contributor/developer how to setup and configure each tool on their local development server instance? Well, this is exactly what the Github actions do for you. You can configure said action to do so many things. As an example, say you want to test that your app will run on php 7.4, 8.0, 8.1 and 8.2. Well, you can do that.
What if, you want the code to meet your coding standard, as is its formatting, before you allow a pull request to be merged? Well, you can do that too.
What if, you want to run Phpstan or Psalm against the entire repo, and it pass, before you merge that contributor / developer pull request? Well, yes, you can do that as well.
Matter of fact, you can do all of these things in a single streamlined manner using Github actions!!!
In my next post I will post up a general approach for how to integrate the github actions into your workflow, some example actions etc.
Last edited: