Gitlab workflow

I have been asked to investigate as to whether the following is achievable

Developers create a branch in gitlab to implement a feature performing local commits
Developers push to the gitlab server
When the feature is complete they create a merge request to merge the branch and master

Before the merge takes place we would like to run some tests on the feature branch and then not allow a merge request if the tests fail.

Is this possible?


Yes, it’s possible. See Merge when Pipeline Succeeds.

You can also enable voting/approvals for merge requests. See Merge Request Approvals