git – How to setup gerrit + unit tests + CI (unity3d project)

Question:

What is the best way to deploy a gerrit-based environment? Before submitting a commit to gerrit for review, it is necessary to do unit tests and build a build on iOS and Android. In case of failure of builds or unit tests, do not allow this commit to be submitted for review.

Answer:

I can't say for sure, but I can try to point you in the right direction: would you like to use Git's commit hooks ?
Those. for example, in the root of your git repository, find the hooks directory ( .git/hooks ), then create a file there with the appropriate name (the file name must match the name of the hook), i.e. for example, pre-commit is suitable for you, inside which you can perform the necessary actions.


If you, nevertheless, are interested in this approach, you can read more here and here .

Scroll to Top