From da90b90c97e60e2519697178e504b52ca8951f7e Mon Sep 17 00:00:00 2001 From: openhands Date: Tue, 15 Sep 2026 11:20:40 +0200 Subject: [PATCH] fix(ci): guard browser context cleanup and export news e2e env before build --- e2e/news-real/news.spec.ts | 2 +- scripts/ci-preflight.sh | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/e2e/news-real/news.spec.ts b/e2e/news-real/news.spec.ts index 6c9d1073..d337de11 100644 --- a/e2e/news-real/news.spec.ts +++ b/e2e/news-real/news.spec.ts @@ -295,7 +295,7 @@ test("staff signs in, saves a draft, previews it and publishes to anonymous read body: JSON.stringify(errors, null, 2), contentType: "application/json", }); - await anonymous.close(); + await anonymous.close().catch(() => {}); await database.end(); redis.disconnect(); } diff --git a/scripts/ci-preflight.sh b/scripts/ci-preflight.sh index b4166d93..cea83037 100644 --- a/scripts/ci-preflight.sh +++ b/scripts/ci-preflight.sh @@ -36,7 +36,8 @@ trap 'exit 143' TERM pnpm install --frozen-lockfile pnpm exec playwright install chromium -build_attempted=1 +export NEWS_E2E_IMAGE="$image" +export NEWS_E2E_RELEASE="$sha" DOCKER_BUILDKIT=1 docker build --network=host --progress=plain \ --build-arg NEXT_DEPLOYMENT_ID="$sha" -t "$image" . -NEWS_E2E_IMAGE="$image" NEWS_E2E_RELEASE="$sha" node --import tsx e2e/news-real/run.ts +NEWS_E2E_IMAGE="$image" NEWS_E2E_RELEASE="$sha" node --import tsx e2e/news-real/run.ts \ No newline at end of file