3

I am trying to start using GitHub flow in my project. I like that it is simple and, more importantly, it encourages continuous delivery.

However, there is one thing about this flow that I cannot understand: how do I test my changes? The 5th step of the official guide says:

Once your pull request has been reviewed and the branch passes your tests, you can deploy your changes to verify them in production.

But what if these "my tests" (or at least some of them) cannot be run locally, what if in order to run the tests I have to deploy my changes to a TEST environment first? What branch do I deploy then?

Now, I could deploy my feature branch to TEST. But what if other developers also want to deploy their feature branches at the same time? They will then inevitably rewrite my changes. The solution to this could be having many TEST environments, but again, this can be too expensive and, moreover, this approach still allows to only test the features in isolation. If two features work in isolation, it does not yet mean, that they will work together (once deployed to production).

Another option would be to have a dedicated branch for deploying to TEST environment, say next. I could merge my feature branch to next and then deploy next to TEST. But then why does GitHub flow say nothing about it? By the way, GitHub flow with next branch looks very much like Gitworkflows already.

To summarize my question: how do I test my changes that cannot be tested locally with GitHub flow? I really cannot believe that GitHub flow encourages me to do it in production.

Thank you.

7
  • This particular branching model doesn't appear to have what you need. Perhaps you can evaluate Gitflow, described here and here. Dec 20, 2020 at 16:03
  • You can also pick and choose what branching features you want. For example, Gitflow includes in its model a provision for hot-fixing, but you won't need that if you never hot-fix. Dec 20, 2020 at 16:05
  • @RobertHarvey, GitFlow is what is currently being used in my project. The problem with GitFlow is that you cannot really do continuous delivery with it, can you? I wonder, how can then GitHub flow be useful at all, if the only place to test my changes is my local environment?
    – yaskovdev
    Dec 20, 2020 at 18:16
  • 3
    What prevents you from simply modifying one of these processes so that it does what you need it to do? Dec 20, 2020 at 18:26
  • 2
    Because everyone's needs are different. For example, some shops deploy on a schedule, but other shops deploy when "feature complete" status is achieved. Dec 20, 2020 at 18:41

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.