-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
56 lines (52 loc) · 2.5 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
[tox]
envlist = worsica-portal-{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_* PYTHONIOENCODING
#sitepackages = true
setuptools_version = setuptools==57
deps =
-r/usr/local/requirements-essential-pip.txt
-r/usr/local/requirements-frontend-pip.txt
#worsica-portal (worsica_web bind)
#selenium
[testenv:worsica-portal-functional]
#setenv =
# {[testenv]setenv}
passenv = {[testenv]passenv} RABBITMQ_* POSTGRES_*
#sitepackages = {[testenv]sitepackages}
deps =
{[testenv]deps}
pytest
pytest-cov
selenium
commands_pre =
bash -c "echo '1- get webdrivers' && /usr/local/worsica_web/worsica_jenkins_webdriver_download.sh"
bash -c "echo '2- generate nextcloud_access' && /usr/local/worsica_web/worsica_jenkins_generate_nextcloud_access.sh"
bash -c "echo '3- generate ssecrets' && /usr/local/worsica_web/worsica_jenkins_generate_ssecrets.sh"
bash -c "echo '4- install postgres client' && sudo yum install postgresql -y"
bash -c "echo '5- install custom oidc' && curl -L 'https://drive.google.com/uc?export=download&id=1DAuDDKkvTiOQ_GJwo9AzLcZk3Rnefqdn' -o worsica-django-auth-oidc-0.6.1.zip && /usr/local/worsica_web/.tox/worsica-portal-functional/bin/pip3 install worsica-django-auth-oidc-0.6.1.zip && rm -rf worsica-django-auth-oidc-0.6.1.zip"
bash -c "echo '5.5- copy settings_sensitive.py' && /usr/local/worsica_web/worsica_jenkins_run_qc_functional_frontend.sh"
bash -c "echo '6- replace worsica-backend by postgis in frontend settings_sensitive.py' && sed -i -e 's/worsica-backend/postgis/g' /usr/local/worsica_web/worsica_web/settings_sensitive.py"
bash -c "echo '7- create db for frontend' && /usr/local/worsica_web/worsica_jenkins_create_initial_db.sh"
bash -c "echo '8- ...and restart again' && (/usr/local/worsica_web/worsica_runserver.sh &> /usr/local/worsica_web/runserver.out & disown -h) && sleep 10"
commands = bash -c "pytest -ra /usr/local/worsica_web/worsica_functional_tests.py"
[testenv:worsica-portal-stylecheck]
deps =
{[testenv]deps}
flake8
commands = flake8 /usr/local/worsica_web --exclude /usr/local/worsica_web/.tox --exit-zero
[testenv:worsica-portal-security]
deps =
{[testenv]deps}
bandit==1.7.1
commands = bandit -r /usr/local/worsica_web -x /usr/local/worsica_web/.tox -f html -o bandit_worsica-portal.html --exit-zero