-
-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathgenerate_snapshots.sh
More file actions
executable file
·27 lines (26 loc) · 1020 Bytes
/
generate_snapshots.sh
File metadata and controls
executable file
·27 lines (26 loc) · 1020 Bytes
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
#!/bin/bash
# Helper script to generate linux snapshots via Docker
# Reuses existing test scripts from package.json with CI=true to enforce single worker/xvfb.
echo "Starting Docker container..."
docker run --rm --ipc=host \
-v "$(pwd):/work" \
-v /work/node_modules \
-v /work/packages/extension/node_modules \
-v /work/packages/integration_test/node_modules \
-w /work \
-e CI=true \
-e DEBUG=pw:browser* \
mcr.microsoft.com/playwright:v1.58.0-noble \
/bin/bash -c "
echo 'Installing xvfb...'
apt-get update && apt-get install -y xvfb
echo 'Installing pnpm...'
npm install -g pnpm@9.15.9
echo 'Installing dependencies...'
pnpm install --frozen-lockfile=false
echo 'Running update-snapshots...'
# Directly reuse the test script from packages/integration_test/package.json
# CI=true ensures it runs with xvfb-run
xvfb-run --auto-servernum --server-args='-screen 0 1280x720x24' pnpm --filter integration-test run test --update-snapshots
echo 'Finished.'
"