Repository navigation
Expand file tree
/
Copy pathdocker-compose-e2e-tests.yaml
More file actions
87 lines (82 loc) · 2.35 KB
/
Copy pathdocker-compose-e2e-tests.yaml
File metadata and controls
87 lines (82 loc) · 2.35 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
version: "3"
networks:
devicehub:
driver: bridge
services:
mongo1:
image: mongo:6.0.10
hostname: mongo1
container_name: mongo1
entrypoint:
["mongod", "--replSet", "myReplicaSet", "--bind_ip", "localhost,mongo1"]
networks:
devicehub:
mongosetup:
image: mongo:6.0.10
depends_on:
- mongo1
volumes:
- ./scripts/mongo_setup_test.sh:/scripts/mongo_setup_test.sh
restart: "no"
entrypoint: ["bash", "/scripts/mongo_setup_test.sh"]
networks:
devicehub:
emulator:
build: ./test/e2e/helpers/emulator
hostname: emulator
container_name: emulator
privileged: true
environment:
EMULATOR_ROOT: /opt/android-sdk/emulator
LD_LIBRARY_PATH: "/opt/android-sdk/emulator/lib64/qt/lib:/opt/android-sdk/emulator/lib64/libstdc++:/opt/android-sdk/emulator/lib64:/opt/android-sdk/emulator/lib64/gles_swiftshader"
command: >
bash -c "
adb -a start-server & \
emulator -avd test_avd -read-only -no-accel -delay-adb -no-boot-anim -skip-adb-auth -no-window -no-audio -no-qt -no-snapshot -verbose -logcat '*:v'
"
healthcheck:
test: [ "CMD-SHELL", "adb devices | grep emulator || exit 1" ]
interval: 15s
timeout: 5s
retries: 5
networks:
devicehub:
restart: unless-stopped
devicehub:
build: .
container_name: devicehub
hostname: devicehub
depends_on:
mongosetup:
condition: service_completed_successfully
emulator:
condition: service_healthy
ports:
- "7100:7100"
- "7110:7110"
- "7400-7500:7400-7500"
environment:
- TZ=America/Los_Angeles
- MONGODB_PORT_27017_TCP=mongodb://mongo1:27017
- STF_ADMIN_EMAIL=administrator@fakedomain.com
- STF_ADMIN_NAME=administrator
command: stf local --adb-host emulator --public-ip 0.0.0.0 --provider-min-port 7400 --provider-max-port 7500
healthcheck:
test: ["CMD", "curl", "-f", "http://devicehub:7100/auth/contact"]
interval: 20s
timeout: 10s
retries: 10
restart: unless-stopped
networks:
devicehub:
devicehub-e2e-tests:
build: ./test/e2e
container_name: devicehub-e2e-tests
depends_on:
devicehub:
condition: service_healthy
command: sleep 30 && npx playwright test
environment:
- CI=1
restart: "no"
network_mode: host