Files
conductor-oss--conductor/ui-next/docker-compose.integration.yml
Andrew Lai (AJ) 9e97d211b9 Add end to end integration tests and bump coverage to 90% requirement (#1494)
* - Add end to end integration tests
- Update playwright so it can get OPENAI_API_KEY from .env.local

* Bump coverage percentage to 90% to test CI before merging in additional tests

* Update workflow to use  coverage report script

* Add tests and remove kitchen

* - Delete orphaned components
- Cleanup local coverage runs

* Make test less flaky

* Run integration tests in docker for consistent snapshots

* Show incompletion reasons

---------

Co-authored-by: Dale Brady <49766562+bradyyie@users.noreply.github.com>
2026-08-18 08:55:17 -07:00

125 lines
3.6 KiB
YAML

# Runs integration Playwright against a live Conductor backend in a consistent
# Linux + Chromium environment so screenshot baselines match locally and in CI.
#
# Usage (from ui-next/):
# pnpm test:e2e:integration # via scripts/run-integration-e2e.sh
# pnpm test:e2e:integration:update-snapshots
#
# Prerequisites:
# - conductor:server image built (script builds it if missing)
# - dist/ present (script runs pnpm build if missing)
services:
conductor-postgres:
image: postgres:16
environment:
- POSTGRES_USER=conductor
- POSTGRES_PASSWORD=conductor
networks:
- internal
healthcheck:
test: timeout 5 bash -c 'cat < /dev/null > /dev/tcp/localhost/5432'
interval: 5s
timeout: 5s
retries: 12
logging:
driver: "json-file"
options:
max-size: "1k"
max-file: "3"
conductor-server:
image: conductor:server
build:
context: ..
dockerfile: docker/server/Dockerfile
environment:
- CONFIG_PROP=config-postgres.properties
- conductor.app.ownerEmailMandatory=false
# Forwarded from the host when set. Empty/absent ⇒ OpenAI stays unconfigured and
# LLM execution tests that need a live provider self-skip.
- OPENAI_API_KEY=${OPENAI_API_KEY:-}
networks:
- internal
healthcheck:
test: ["CMD", "curl", "-sf", "http://localhost:8080/health"]
interval: 10s
timeout: 10s
retries: 24
links:
- conductor-postgres:postgresdb
depends_on:
conductor-postgres:
condition: service_healthy
logging:
driver: "json-file"
options:
max-size: "10k"
max-file: "3"
app:
image: node:20-slim
working_dir: /app
volumes:
- .:/app
- integration_app_modules:/app/node_modules
networks:
- internal
environment:
CI: "true"
npm_config_store_dir: /root/.pnpm-store
# Preview proxy target — Docker DNS name on the internal network.
VITE_WF_SERVER: http://conductor-server:8080
depends_on:
conductor-server:
condition: service_healthy
command: >
sh -c "corepack enable &&
pnpm install --frozen-lockfile &&
pnpm preview --host 0.0.0.0 --port 1234"
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: 120s
playwright:
image: mcr.microsoft.com/playwright:v1.60.0-noble
working_dir: /app
volumes:
- .:/app
- integration_pw_modules:/app/node_modules
# Share the app container's network so localhost:1234 is preview and
# conductor-server resolves on the same Docker network.
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
CONDUCTOR_SERVER_URL: http://conductor-server:8080
SKIP_DOCKER: "true"
SKIP_WEBSERVER: "true"
E2E_COVERAGE: ${E2E_COVERAGE:-}
OPENAI_API_KEY: ${OPENAI_API_KEY:-}
PLAYWRIGHT_FLAGS: ${PLAYWRIGHT_FLAGS:-}
command: >
sh -c "corepack enable &&
pnpm install --frozen-lockfile &&
pnpm exec playwright test --config playwright.integration.config.ts $${PLAYWRIGHT_FLAGS:-}"
networks:
internal:
volumes:
integration_app_modules:
integration_pw_modules: