Gitlab CI merge request not building merged branch

Gitlab CI integrates very nicely with the merge request interface in Gitlab. However, I’ve noticed that when a merge request is made, Gitlab CI only builds the branch that’s being merged in, and not the result of the merge. What this means is that the merge could potentially break the master branch, and the testing would not be aware of it.

This doesn’t seem very useful. Is there an option to get Gitlab CI to merge master into the branch before it builds? I was considering adding the git merge command in the build config yml file, but I think that would create a problem when building the master branch itself (without a merge), as it would be asking the master branch to merge with itself. Any ideas?

Thanks in advance!