Files
conductor-oss--conductor/ui-next/docker-compose.snapshots.yml
wehub-resource-sync a9cd7750f4
CI / unit-test (push) Has been cancelled
CI / detect-changes (push) Has been cancelled
CI / build (push) Has been cancelled
Publish docs via GitHub Pages / Deploy docs (push) Has been cancelled
CI / test-harness (push) Has been cancelled
CI / generate-e2e-matrix (push) Has been cancelled
CI / e2e (push) Has been cancelled
CI / build-ui (push) Has been cancelled
Release Drafter / update_release_draft (push) Has been cancelled
UI v2 Integration CI / E2E (Integration) (push) Has been cancelled
UI v2 CI / Lint, Format & Test (push) Has been cancelled
UI v2 CI / E2E (Mocked) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:37:56 +08:00

61 lines
1.9 KiB
YAML

# Runs snapshot tests in a consistent Linux + Chromium environment so that
# baselines are pixel-identical across developer machines and CI.
#
# Usage (via package.json scripts):
# pnpm test:e2e:snapshots # run snapshot tests
# pnpm test:e2e:snapshots:update # regenerate baselines
services:
app:
image: node:20-slim
working_dir: /app
volumes:
- .:/app
- app_modules:/app/node_modules
environment:
CI: "true"
npm_config_store_dir: /root/.pnpm-store
# Listen on all interfaces so the playwright service can reach it.
command: >
sh -c "corepack enable &&
pnpm install --frozen-lockfile &&
pnpm dev --host 0.0.0.0"
healthcheck:
test:
- CMD-SHELL
- >
node -e "require('http').get('http://localhost:1234',
r => process.exit(r.statusCode < 400 ? 0 : 1)
).on('error', () => process.exit(1))"
interval: 5s
timeout: 5s
retries: 60
start_period: 300s
playwright:
image: mcr.microsoft.com/playwright:v1.60.0-noble
working_dir: /app
volumes:
- .:/app
- pw_modules:/app/node_modules
# Share the app container's network namespace so Playwright reaches the
# Vite dev server via http://localhost:1234 without cross-container DNS.
network_mode: "service:app"
depends_on:
app:
condition: service_healthy
environment:
CI: "true"
npm_config_store_dir: /root/.pnpm-store
BASE_URL: http://localhost:1234
PLAYWRIGHT_FLAGS: ${PLAYWRIGHT_FLAGS:-}
# PLAYWRIGHT_FLAGS is set by the :update script to --update-snapshots.
command: >
sh -c "corepack enable &&
pnpm install --frozen-lockfile &&
pnpm exec playwright test --config playwright.snapshots.config.ts $${PLAYWRIGHT_FLAGS:-}"
volumes:
app_modules:
pw_modules: