-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.local.yml
More file actions
128 lines (124 loc) · 4.95 KB
/
docker-compose.local.yml
File metadata and controls
128 lines (124 loc) · 4.95 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
# Simple Docker Compose for local E2E testing
# This runs only Playwright in Docker against locally running apps
services:
playwright-design-system:
image: mcr.microsoft.com/playwright:v${PLAYWRIGHT_VERSION:-1.58.0}-noble
platform: linux/amd64
working_dir: /app
shm_size: '2gb'
volumes:
- .:/app:cached
- node_modules:/app/node_modules
- playwright_cache:/ms-playwright
# Map test directories for screenshot updates
- ./packages/design-system/src:/app/packages/design-system/src:delegated
- ./packages/design-system/test-results:/app/packages/design-system/test-results:delegated
- ./packages/design-system/playwright-report:/app/packages/design-system/playwright-report:delegated
environment:
- NODE_ENV=test
- CI=false
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
- PLAYWRIGHT_ARGS
network_mode: host
command:
- sh
- -c
- |
echo 'Setting up pnpm...' &&
npm install -g pnpm@10.33.2 &&
echo 'Installing dependencies...' &&
pnpm install --frozen-lockfile &&
echo 'Building playwright-config...' &&
pnpm --filter=@wallarm-org/playwright-config build &&
echo 'Installing Playwright browsers...' &&
pnpm --filter=@wallarm-org/design-system exec playwright install --with-deps chromium &&
echo 'Running Design System E2E tests...' &&
if [ -z "${PLAYWRIGHT_ARGS}" ]; then
pnpm --filter=@wallarm-org/design-system exec playwright test --config=playwright.config.docker.ts --project=chromium;
else
echo "Running tests for: ${PLAYWRIGHT_ARGS}" &&
pnpm --filter=@wallarm-org/design-system exec playwright test --config=playwright.config.docker.ts --project=chromium ${PLAYWRIGHT_ARGS};
fi
profiles:
- design-system
playwright-design-system-update:
image: mcr.microsoft.com/playwright:v${PLAYWRIGHT_VERSION:-1.58.0}-noble
platform: linux/amd64
working_dir: /app
shm_size: '2gb'
volumes:
- .:/app:cached
- node_modules:/app/node_modules
- playwright_cache:/ms-playwright
# Map test directories for screenshot updates
- ./packages/design-system/src:/app/packages/design-system/src:delegated
- ./packages/design-system/test-results:/app/packages/design-system/test-results:delegated
- ./packages/design-system/playwright-report:/app/packages/design-system/playwright-report:delegated
environment:
- NODE_ENV=test
- CI=false
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
- PLAYWRIGHT_ARGS
network_mode: host
command:
- sh
- -c
- |
echo 'Setting up pnpm...' &&
npm install -g pnpm@10.33.2 &&
echo 'Installing dependencies...' &&
pnpm install --frozen-lockfile &&
echo 'Building playwright-config...' &&
pnpm --filter=@wallarm-org/playwright-config build &&
echo 'Installing Playwright browsers...' &&
pnpm --filter=@wallarm-org/design-system exec playwright install --with-deps chromium &&
echo 'Updating Design System E2E screenshots...' &&
if [ -z "${PLAYWRIGHT_ARGS}" ]; then
pnpm --filter=@wallarm-org/design-system exec playwright test --config=playwright.config.docker.ts --project=chromium --update-snapshots;
else
echo "Updating screenshots for: ${PLAYWRIGHT_ARGS}" &&
pnpm --filter=@wallarm-org/design-system exec playwright test --config=playwright.config.docker.ts --project=chromium ${PLAYWRIGHT_ARGS} --update-snapshots;
fi
profiles:
- design-system-update
playwright-all:
image: mcr.microsoft.com/playwright:v${PLAYWRIGHT_VERSION:-1.58.0}-noble
platform: linux/amd64
working_dir: /app
shm_size: '2gb'
volumes:
- .:/app:cached
- node_modules:/app/node_modules
- playwright_cache:/ms-playwright
environment:
- NODE_ENV=test
- CI=false
- PLAYWRIGHT_BROWSERS_PATH=/ms-playwright
- PLAYWRIGHT_ARGS
network_mode: host
command:
- sh
- -c
- |
echo 'Setting up pnpm...' &&
npm install -g pnpm@10.33.2 &&
echo 'Installing dependencies...' &&
pnpm install --frozen-lockfile &&
echo 'Building playwright-config...' &&
pnpm --filter=@wallarm-org/playwright-config build &&
echo 'Installing Playwright browsers...' &&
pnpm --filter=@wallarm-org/design-system exec playwright install --with-deps chromium &&
echo 'Running all E2E tests...' &&
if [ -z "${PLAYWRIGHT_ARGS}" ]; then
pnpm --filter=@wallarm-org/design-system exec playwright test --config=playwright.config.docker.ts;
else
echo "Running tests for: ${PLAYWRIGHT_ARGS}" &&
pnpm --filter=@wallarm-org/design-system exec playwright test --config=playwright.config.docker.ts ${PLAYWRIGHT_ARGS};
fi
profiles:
- all
volumes:
node_modules:
driver: local
playwright_cache:
driver: local