-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
57 lines (50 loc) · 2.1 KB
/
tox.ini
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
[tox]
envlist = py311
[testenv]
install_command =
pip install --upgrade -r {toxinidir}/requirements.txt {opts} {packages}
deps =
allure-pytest-bdd
allowlist_externals =
scoop
allure
timeout
cmd
terminate_timeout
mkdir
sleep
npm
netlify
setenv =
RAVS_PASSWORD={env:RAVS_PASSWORD}
HEADLESS_MODE={env:HEADLESS_MODE}
BROWSER={env:BROWSER}
DEVICE={env:DEVICE}
TEST_ENVIRONMENT={env:TEST_ENVIRONMENT}
MARKER={env:MARKER}
AGENTS={env:AGENTS}
NETLIFY_SITE_ID={env:NETLIFY_SITE_ID}
NETLIFY_AUTH_TOKEN={env:NETLIFY_AUTH_TOKEN}
commands_pre =
python -c "import os; os.makedirs('allure-results', exist_ok=True)"
pip install --upgrade playwright
playwright install
playwright install-deps
python -c "import os; ravs_password = os.getenv('RAVS_PASSWORD', 'Not set'); asterisk_password = '*' * len(ravs_password) if ravs_password != 'Not set' else 'Not set'; print('RAVS_PASSWORD:', asterisk_password)"
python -c "import os; print('HEADLESS_MODE:', os.getenv('HEADLESS_MODE', 'Not set'))"
python -c "import os; print('BROWSER:', os.getenv('BROWSER', 'Not set'))"
python -c "import os; print('MARKER:', os.getenv('MARKER', 'Not set'))"
python -c "import os; print('AGENTS:', os.getenv('AGENTS', 'Not set'))"
python -c "import os; print('DEVICE:', os.getenv('DEVICE', 'Not set'))"
python -c "import os; print('TEST_ENVIRONMENT:', os.getenv('TEST_ENVIRONMENT', 'Not set'))"
python -c "import shutil; shutil.rmtree('./allure-results', ignore_errors=True)"
commands =
pytest --log-level=DEBUG --log-file=tox.log --capture=no -p allure_pytest_bdd --alluredir=./allure-results ./tests -k "{env:MARKER}" --numprocesses {env:AGENTS}
# pytest --capture=no -p allure_pytest_bdd --alluredir=./allure-results ./tests
commands_post =
allure serve --port 5050 ./allure-results
# allure generate ./allure-results --clean
# npm install -g netlify-cli
# netlify deploy --prod --dir ./allure-report --message "Deploy test report" --site {env:NETLIFY_SITE_ID}
# env:
# NETLIFY_AUTH_TOKEN: {env:NETLIFY_AUTH_TOKEN}