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.
This commit is contained in:
@@ -29,9 +29,19 @@ dotnet test tests/api/MicCheck.Api.Tests.Integration/MicCheck.Api.Tests.Integrat
|
|||||||
|
|
||||||
log "Installing admin e2e dependencies"
|
log "Installing admin e2e dependencies"
|
||||||
npm --prefix src/admin ci
|
npm --prefix src/admin ci
|
||||||
npm --prefix src/admin run e2e:install
|
|
||||||
|
|
||||||
log "Running Playwright admin e2e suite against $BASE_URL"
|
# Playwright's bundled Chromium is a glibc binary and `--with-deps` only knows
|
||||||
E2E_BASE_URL="$BASE_URL" npm --prefix src/admin run e2e
|
# 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"
|
log "smoke-qa.sh complete - QA environment validated end to end"
|
||||||
|
|||||||
Reference in New Issue
Block a user