Skip to main content

How to fail a build on failing unit tests

Comments

2 comments

  • Permanently deleted user

    But what if my tests need access to a service, specifically a database?

    0
  • Larry

    Those don’t work in the build environment. (Also, they’re not technically unit tests at that point.)

    If you need tests that run on a service, you could use a post-deploy hook and have it run only on non-master branches. That wouldn’t block the deploy of course, but it would still give you an automated test run.

    0

Please sign in to leave a comment.