ci: fix E2E postgres-test collision and smoke @playwright/test resolution
CI / Architecture Guardrails (push) Successful in 3m46s
CI / Assistant Split Regression (push) Successful in 4m38s
CI / Lint (push) Successful in 4m56s
CI / Typecheck (push) Successful in 5m24s
CI / Unit Tests (push) Failing after 5m21s
CI / Build (push) Successful in 5m46s
CI / Fresh-Linux Docker Deploy (push) Failing after 4m35s
CI / Release Images (push) Has been cancelled
CI / E2E Tests (push) Has been cancelled

E2E: test-server.mjs always spins up its own postgres-test container
and publishes port 5432 on the docker host — colliding with Gitea's
core postgres on the QNAP runner. Add PLAYWRIGHT_USE_EXTERNAL_DB
opt-in so CI can reuse the e2epg job-service container (which
test-server still pushes+seeds into). Set the flag in the E2E job.

docker-deploy smoke: install @playwright/test locally (no -g, no
--save) so the CJS require() in apps/web/playwright.ci.config.ts
resolves it by walking up from the config directory. Global npm
install lands in a hostedtoolcache path Node does not search.
This commit is contained in:
2026-04-13 00:53:19 +02:00
parent ca71be14c5
commit a88db567ad
2 changed files with 30 additions and 8 deletions
+11 -2
View File
@@ -323,6 +323,11 @@ jobs:
# ${PGADMIN_PASSWORD:?} check fires and aborts the compose call.
# Provide a dummy value so parsing succeeds — pgadmin is never started.
PGADMIN_PASSWORD: ci-unused
# Tell test-server.mjs not to spin up its own postgres-test container
# — the e2epg job service is already running and reachable. Without
# this, test-server tries to publish 5432 on the QNAP host, which
# collides with Gitea's core postgres.
PLAYWRIGHT_USE_EXTERNAL_DB: "true"
NEXTAUTH_URL: ${{ env.CI_AUTH_URL }}
AUTH_URL: ${{ env.CI_AUTH_URL }}
NEXTAUTH_SECRET: ${{ env.CI_AUTH_SECRET }}
@@ -491,9 +496,13 @@ jobs:
node-version: "20"
- name: Install Playwright and Chromium
# Install locally (not -g) so the CJS require() in playwright.ci.config.ts
# resolves @playwright/test by walking up from apps/web/. A global
# install puts it in /opt/hostedtoolcache/.../lib/node_modules which
# Node's resolver doesn't check.
run: |
npm install -g @playwright/test@1.49
playwright install chromium --with-deps
npm install --no-save --no-package-lock @playwright/test@1.49
npx playwright install chromium --with-deps
- name: Run smoke tests
env: