-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
54 lines (48 loc) · 2.33 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
[tox]
envlist = worsica-intermediate-{functional,stylecheck,security}
skipsdist = true
minversion = 3.10.0
requires = virtualenv >= 19.0
[testenv]
basepython = python3.6
allowlist_externals = *
download = true
setenv =
VIRTUALENV_PIP=21.3.1
VIRTUALENV_SEEDER=pip
VIRTUALENV_DOWNLOAD=1
passenv = WORSICA_*
#sitepackages = true
setuptools_version = setuptools==57
deps =
-r/usr/local/requirements-essential-pip.txt
-r/usr/local/requirements-interm-pip.txt
uptide
#worsica-intermediate (worsica_web_intermediate bind)
#selenium
[testenv:worsica-intermediate-functional]
passenv = {[testenv]passenv} RABBITMQ_* POSTGRES_*
deps =
{[testenv]deps}
pytest
pytest-cov
selenium
commands_pre =
bash -c "echo '0- get webdrivers' && /usr/local/worsica_web_intermediate/worsica_jenkins_webdriver_download.sh"
bash -c "echo '1- generate nextcloud_access and dataverse_access' && /usr/local/worsica_web_intermediate/worsica_jenkins_generate_nextcloud_access.sh && /usr/local/worsica_web_intermediate/worsica_jenkins_generate_dataverse_access.sh"
bash -c "echo '2- install postgres client' && sudo yum install postgresql -y"
bash -c "echo '2.5- copy settings_sensitive.py' && /usr/local/worsica_web_intermediate/worsica_jenkins_run_qc_functional_intermediate.sh"
bash -c "echo '3- replace worsica-backend by postgis in intermediate settings_sensitive.py' && sed -i -e 's/worsica-backend/postgis/g' /usr/local/worsica_web_intermediate/worsica_web_intermediate/settings_sensitive.py"
bash -c "echo '4- create db for intermediate' && /usr/local/worsica_web_intermediate/worsica_jenkins_create_initial_db.sh"
bash -c "echo '5- ...and restart again' && (/usr/local/worsica_web_intermediate/worsica_runserver.sh &> /usr/local/worsica_web_intermediate/runserver.out & disown -h) && sleep 10"
commands = bash -c "pytest -ra /usr/local/worsica_web_intermediate/worsica_functional_tests.py"
[testenv:worsica-intermediate-stylecheck]
deps =
{[testenv]deps}
flake8
commands = flake8 /usr/local/worsica_web_intermediate --exclude /usr/local/worsica_web_intermediate/.tox --exit-zero
[testenv:worsica-intermediate-security]
deps =
{[testenv]deps}
bandit==1.7.1
commands = - bandit -r /usr/local/worsica_web_intermediate -x /usr/local/worsica_web_intermediate/.tox -f html -o bandit_worsica-intermediate.html --exit-zero