-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
52 lines (51 loc) · 1.7 KB
/
docker-compose.yml
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
# You can use this composition to run tests
# backed by webdriver-recorder. This is helpful if your
# test suite is simple and has no additional dependencies.
# TEST_DIR=/path/to/your/tests docker-compose up --build.
version: '3.1'
services:
selenium:
image: selenium/standalone-chrome:4.1
environment:
SE_NODE_MAX_SESSIONS: 2 # Allows up to two concurrent browser instances to use
# the node.
START_XFVB: "false" # Prevents some expensive overhead we don't need
ports:
- "4444:4444" # This is the port where you can access the selenium
# dashboard
- "7900:7900"
logging:
driver: "none"
volumes:
# We want for test files to available on the selenium
# container because tests may have files the test browser
# needs to serve.
- ${test_dir}:/tests
test-runner:
build:
dockerfile: Dockerfile
target: webdriver-source
context: .
environment:
REMOTE_SELENIUM: selenium:4444
TZ: America/Los_Angeles
test_dir: ${test_dir}
REPORT_DIR: /webdriver-report
COVERAGE_FILE: /coverage/.coverage
disable_session_browser: ${disable_session_browser}
pytest_args: ${pytest_args}
pytest_log_level: ${pytest_log_level}
volumes:
- ./webdriver-report:/webdriver-report
- ./coverage:/coverage
- ${test_dir}:/tests
depends_on:
- selenium
entrypoint: ./entrypoint.sh
command: >
coverage run -a --source=webdriver_recorder
-m pytest
--tb short
-p 'webdriver_recorder.plugin'
-o log_cli=true -o log_cli_level=${pytest_log_level:-error}
${pytest_args:-/tests}