From 28e622464dee74999d27b9d72889b72c75b41643 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johan=20R=C3=B8ed?= Date: Mon, 20 Apr 2026 15:13:04 +0200 Subject: [PATCH] CI: retry testem ci once on failure (Browserstack flake rescue) --- bin/run-browserstack-tests.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/run-browserstack-tests.js b/bin/run-browserstack-tests.js index eee86111b29..35eae86e75b 100755 --- a/bin/run-browserstack-tests.js +++ b/bin/run-browserstack-tests.js @@ -17,7 +17,7 @@ async function run(command, args = []) { // Calling testem directly here instead of `ember test` so that // we do not have to do a double build (by the time this is run // we have already ran `ember build`). - await run('testem', [ + const testemArgs = [ 'ci', '-f', 'testem.browserstack.js', @@ -25,7 +25,16 @@ async function run(command, args = []) { '127.0.0.1', '--port', '7774', - ]); + ]; + + // Absorb flaky single-launcher BrowserStack failures so they + // don't fail otherwise-green CI. + try { + await run('testem', testemArgs); + } catch (e) { + console.log(chalk.yellow(`testem ci failed (${e.shortMessage}); retrying once.`)); + await run('testem', testemArgs); + } console.log('success'); process.exit(0); // eslint-disable-line n/no-process-exit