From aeb4f036279f439aeb6567088813c31b72464f17 Mon Sep 17 00:00:00 2001 From: James Wampler Date: Sat, 4 Jul 2026 18:33:43 -0700 Subject: [PATCH] Run Playwright e2e in the official playwright container on musl runners Playwright's bundled Chromium is glibc-only and --with-deps assumes apt - both fail on this musl/Alpine runner. Run the e2e leg in mcr.microsoft.com/playwright (browsers preinstalled, pinned to the exact resolved @playwright/test version) instead, reachable at the same bridge gateway IP as the rest of the QA stack. --- scripts/ci/smoke-qa.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/scripts/ci/smoke-qa.sh b/scripts/ci/smoke-qa.sh index 3f86530..03a57ce 100755 --- a/scripts/ci/smoke-qa.sh +++ b/scripts/ci/smoke-qa.sh @@ -29,9 +29,19 @@ dotnet test tests/api/MicCheck.Api.Tests.Integration/MicCheck.Api.Tests.Integrat log "Installing admin e2e dependencies" npm --prefix src/admin ci -npm --prefix src/admin run e2e:install -log "Running Playwright admin e2e suite against $BASE_URL" -E2E_BASE_URL="$BASE_URL" npm --prefix src/admin run e2e +# Playwright's bundled Chromium is a glibc binary and `--with-deps` only knows +# apt - neither works on this musl/Alpine runner. Run the e2e leg inside +# Microsoft's official Playwright image instead (glibc, browsers preinstalled +# at /ms-playwright), as a sibling container reachable at the same bridge +# gateway IP used above. Pin the image tag to the exact resolved +# @playwright/test version so the test runner and browser build match. +PW_VERSION="$(node -p "require('./src/admin/node_modules/@playwright/test/package.json').version")" +log "Running Playwright admin e2e suite against $BASE_URL (playwright:v$PW_VERSION-noble)" +docker run --rm \ + -e "E2E_BASE_URL=$BASE_URL" \ + -v "$CI_ROOT:/work" -w /work/src/admin \ + "mcr.microsoft.com/playwright:v${PW_VERSION}-noble" \ + npx playwright test log "smoke-qa.sh complete - QA environment validated end to end"