Github Branch Protection: All Workflows need to succeed

Situation:

  • we don’t have parallel builds
  • we’re use multiple Bitrise workflows to test all our Android modules via Virtual Device Testing
  • the next workflow is triggered at the end of the previous with Bitrise Start Build
  • “Wait for Builds” is set to false as this would require parallel builds

Problem:

  • when Github triggers our initial workflow test1 and this succeeds the Branch protection allows to merge the PR
  • when one of the other workflows fail this does not influence the Branch protection

Question:

  • Can we “manually” control when Bitrise reports back to Github (success or not) without parallel builds?
  • I.e. I would do this after the last workflow in the chain instead of currently after the first workflow

See screenshot:

  • test1 succeeds and starts test2 which fails
  • but Githubs still shows that all is good

Screenshot from 2021-09-28 10-35-04
Screenshot from 2021-09-28 10-35-20

Check out the “Github Status” step. It sounds like you may be able to use this to do what you would like.

One thing - if you are kicking off more then one build to do the tests, the last one finished will be the last one to set the status. So if you kick off 2 builds for testing, if the one that finishes first fails and sets the status, it will be overwritten by when the last build finishes - and the last build may be successful.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.