Edit repository settings:
1.Click branches and add new rule.
Or, if the master rule is already exist, you can click edit:
2.Apply the rules to master branch.
Select Require pull request reviews before merging and Dismiss stale pull request approvals when new commits are pushed.
3.Select all the items belonging to Require status checks to pass before merging.
Then, also check the Include administrators and Restrict who can push to matching branches.