-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
74 lines (73 loc) · 2.38 KB
/
docker-compose.yml
File metadata and controls
74 lines (73 loc) · 2.38 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
services:
# =============================================================================
# E2E Tests: Build and run E2E tests in Docker
# =============================================================================
# Uses cargo-chef for Rust dependency caching — source-only changes skip
# the expensive dependency build step. Release profile overrides disable
# LTO for faster compilation.
#
# Usage:
# pnpm test:e2e:docker # Build + run all tests
# docker compose run --rm tauri-e2e # Same thing
#
tauri-e2e:
platform: linux/amd64
build:
context: .
dockerfile: e2e/Dockerfile
volumes:
# Mount e2e tests for live updates during development
- ./e2e:/app/e2e:ro
# Writable volume for screenshots
- ./e2e-screenshots:/app/e2e-screenshots
environment:
- DISPLAY=:99
- TAURI_APP_PATH=/app/target/release/notebook
command: >
bash -c "
Xvfb :99 -screen 0 1920x1080x24 &
sleep 2 &&
DISPLAY=:99 tauri-driver --port 4444 &
sleep 3 &&
cd /app &&
pnpm test:e2e
"
# =============================================================================
# E2E Shell: Interactive debugging
# =============================================================================
# Starts container with Xvfb and tauri-driver running, drops you into a shell.
# Useful for debugging test failures interactively.
#
# Usage:
# docker compose --profile dev run --rm tauri-e2e-shell
#
# Then inside container:
# pnpm test:e2e # Run all tests
# pnpm wdio run e2e/wdio.conf.js --spec e2e/specs/notebook-execution.spec.js
#
tauri-e2e-shell:
platform: linux/amd64
profiles: ["dev"]
build:
context: .
dockerfile: e2e/Dockerfile
volumes:
- ./e2e:/app/e2e:ro
- ./e2e-screenshots:/app/e2e-screenshots
environment:
- DISPLAY=:99
- TAURI_APP_PATH=/app/target/release/notebook
stdin_open: true
tty: true
command: >
bash -c "
Xvfb :99 -screen 0 1920x1080x24 &
sleep 2 &&
DISPLAY=:99 tauri-driver --port 4444 &
sleep 3 &&
echo '=== E2E Dev Shell ===' &&
echo 'Run tests: pnpm test:e2e' &&
echo 'Run single: pnpm wdio run e2e/wdio.conf.js --spec e2e/specs/notebook-execution.spec.js' &&
echo '' &&
bash
"