Merge is not disabled when yml file is invalid


when my .yml file is invalid I expect my PR not to be able to merge.
for now, I opened the branch protection rule as it seen in the ss:

but when my .yml file is invalid see ss:
the check is not showing up there where it should be and I am allowed to merge my code without my unit tests etc.

is there anything I can do to change this behaviour?