Auto Cancellation

In some cases, you may want a task to be automatically cancelled when any other task in the run fails. For example, you may want to cancel your test tasks whenever linting fails. Any task that has auto-cancel: true set on it will cancel automatically whenever another task fails.

tasks:
  - key: test
    auto-cancel: true
    run: ...

When auto-cancel: true is set on a parallel group task, only tasks outside of the parallel group will cause auto-cancellation. For example, if you run your tests with 3 shards and one of the shards fails, the other two shards will not automatically be cancelled. The same is true for embedded runs; if you set auto-cancel: true on an embedded run, tasks inside the embedded run will not cause the embedded run to cancel automatically.