title: How to run GitLab CI build on MR?
body: <p>I am new to GitLab CI, trying to setup a build that I need to be triggered when a merge request is created. Currently the build runs after the MR is accepted and merged into 'develop' branch. Which is good. But I was also expecting the build to run when a MR is created.</p>
  
  <p>My gitlab-ci.yml is as follows - am I missing something?</p>
  
  <pre><code>stages:
    - test
  
  test_project:
    stage: test
    script:
      - xcodebuild -scheme CodeRedTests -sdk iphonesimulator10.2 -workspace CodeRed.xcworkspace -configuration Debug clean build test -destination "platform=iOS Simulator,OS=10.2,name=iPhone 5s" | xcpretty -s
    only:
      - develop
    tags:
      - ios_10
      - xcode_8
      - osx_10-12
  </code></pre>