Gitlab offers tools to set up a CI pipeline in order to analyze and test your code automatically before merging. I wrote an article on medium explaining how to set up a Gitlab CI pipeline with Symfony 3 and Symfony 4