3

This is a sort of follow up questions to https://stackoverflow.com/a/57742838/651174, as the question/answer is over 2 years old and, well, GitHub seems to make progress/changes pretty rapidly, especially as it relates to Github Actions.

I have some tests that run on GitHub actions, and I would like to reject a push to the Master branch if one of the tests doesn't pass. Is this possible to do?

If not, are there alternate ways to 'enforce' this kind of behavior -- that is, not allowing things to go into Master if any of the tests fail (hopefully someone doesn't have to manually do this on a PR request or something?).

David542
  • 104,438
  • 178
  • 489
  • 842

1 Answers1

0

If you check the repository settings under branches you can add some rules. There should be one for Require status checks pass before merging. You can then choose which checks need to be completed and if they fail the pull request will not be allowed to merge

This documentation may be of some use!