|
| 1 | +--- |
| 2 | +title: Mitigation |
| 3 | +description: Quarantine problematic tests to unblock CI without losing visibility. |
| 4 | +--- |
| 5 | + |
| 6 | +When a flaky or broken test blocks CI, teams face a tough choice: fix it |
| 7 | +immediately, delete it, or ignore it. Quarantine offers a better option. The |
| 8 | +test keeps running, but its failures no longer block merges. You maintain full |
| 9 | +visibility without disruption. |
| 10 | + |
| 11 | +## How quarantine works |
| 12 | + |
| 13 | +A quarantined test still executes in your CI pipeline and its results are |
| 14 | +still collected by Mergify. The difference is that failures are ignored for |
| 15 | +merge decisions. |
| 16 | + |
| 17 | +This means: |
| 18 | + |
| 19 | +- Your CI stays green while you work on a fix |
| 20 | + |
| 21 | +- Historical data is preserved, so you can track whether the test improves |
| 22 | + or worsens over time |
| 23 | + |
| 24 | +- Other team members can see the test is quarantined and why |
| 25 | + |
| 26 | +Quarantine works on any branch, not just the default branch. |
| 27 | + |
| 28 | +:::note |
| 29 | + Quarantined tests must still be uploaded through one of the supported CI |
| 30 | + integrations. See the |
| 31 | + [test framework configuration](/ci-insights#test-framework-configuration) |
| 32 | + for setup details. |
| 33 | +::: |
| 34 | + |
| 35 | +## Manual quarantine |
| 36 | + |
| 37 | +You can manually add or remove specific tests from quarantine through the |
| 38 | +Mergify dashboard. This is useful when you've identified a problematic test |
| 39 | +through [Detection](/test-insights/detection) and want to stop it from |
| 40 | +blocking your team while you investigate. |
| 41 | + |
| 42 | +For technical details on how quarantine integrates with your CI pipeline, |
| 43 | +see the [Quarantine documentation](/ci-insights/quarantine). |
| 44 | + |
| 45 | +## Auto-quarantine |
| 46 | + |
| 47 | +Auto-quarantine lets Mergify automatically quarantine tests without manual |
| 48 | +intervention. By default, only flaky tests are quarantined automatically. |
| 49 | +You can also enable quarantining of known broken tests through an additional |
| 50 | +option. |
| 51 | + |
| 52 | +This is useful for teams that want hands-off management of unreliable tests. |
| 53 | +You can enable or disable auto-quarantine per repository from the Mitigation |
| 54 | +page in the dashboard. |
| 55 | + |
| 56 | +## Practical workflows |
| 57 | + |
| 58 | +### Quarantining a test from Detection |
| 59 | + |
| 60 | +When you identify a high-impact flaky or broken test in |
| 61 | +[Detection](/test-insights/detection), you can quarantine it directly to |
| 62 | +stop it from blocking merges while you work on a fix. |
| 63 | + |
| 64 | +### Reviewing quarantined tests |
| 65 | + |
| 66 | +Periodically check the Mitigation page to review quarantined tests. Look |
| 67 | +for tests whose health status has improved; these may be ready to be |
| 68 | +removed from quarantine. |
| 69 | + |
| 70 | +### Enabling auto-quarantine |
| 71 | + |
| 72 | +For repositories where broken tests frequently block CI, enable |
| 73 | +auto-quarantine to let Mergify handle it automatically. This reduces manual |
| 74 | +overhead and keeps your CI pipeline moving. |
| 75 | + |
| 76 | +## Setup |
| 77 | + |
| 78 | +Mitigation uses the same CI integration as Detection. To ensure quarantine |
| 79 | +works correctly, your CI must be configured to check quarantine status. See |
| 80 | +the [Quarantine documentation](/ci-insights/quarantine) for technical setup |
| 81 | +details. |
0 commit comments