Gitflow with pull request or pull request
You can set up Branch Policies on your develop branch which requires a build to pass successfully before the Pull Request can be completed.

I have set this up for my team with great success; we very rarely will have a broken master branch. The PR does not run the main build, but instead runs a separate, slimmed down build that checks that the code compiles and the unit tests pass. The "Gated" build runs on Pull Request creation, the "Full" build is triggered on change in master branch (PR completion).