By default Github will still let you merge even when status checks fail:
To block merging completely: In your Github repository head to Settings -> Branches -> Protected branches and choose the branch that you'd like to be able to freeze (e.g. master).
Check Protect this branch.
Check Require status checks to pass before merging.
Under Status checks found in the last week for this repository check mergefreeze.
Optionally check Include administrators if you want admins to obey the rules too.
Click Save changes
Now when the branch is frozen users will not be able to merge: