How to config Only allow merge requests to be merged if the pipeline succeeds

I have config Only allow merge requests to be merged if the pipeline succeeds
and My gitlab-ci.yml is:
stages:

  • test
  • build

syntax:
stage: test
script:
- pwd
tags:
- oa
only:
- develop

build:
stage: build
script:
- pwd
tags:
- oa
only:
- develop
But My merge page always:

the tips is:Pipelines need to be configured to enable this feature
But I don’t know how to enable this feature