mirror of
https://gitlab.crans.org/mediatek/med.git
synced 2024-11-27 00:47:10 +00:00
Upgrade for Debian Buster
This commit is contained in:
parent
a6db8a37e7
commit
52af84b146
@ -6,16 +6,6 @@ stages:
|
|||||||
before_script:
|
before_script:
|
||||||
- pip install tox
|
- pip install tox
|
||||||
|
|
||||||
python35:
|
|
||||||
image: python:3.5
|
|
||||||
stage: test
|
|
||||||
script: tox -e py35
|
|
||||||
|
|
||||||
python36:
|
|
||||||
image: python:3.6
|
|
||||||
stage: test
|
|
||||||
script: tox -e py36
|
|
||||||
|
|
||||||
python37:
|
python37:
|
||||||
image: python:3.7
|
image: python:3.7
|
||||||
stage: test
|
stage: test
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
# Option "-i" will be only available in Django 3.0+, but it does not support Python 3.5
|
# Option "-i" will be only available in Django 3.0+, but it does not support Python 3.5
|
||||||
#python manage.py compilemessages -i ".tox" -i "venv"
|
#python manage.py compilemessages -i ".tox" -i "venv"
|
||||||
python manage.py compilemessages
|
python manage.py compilemessages
|
||||||
python manage.py makemigrations
|
|
||||||
|
|
||||||
# Wait for database
|
# Wait for database (docker)
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
@ -16,16 +15,12 @@ python manage.py collectstatic --no-input
|
|||||||
# harakiri parameter respawns processes taking more than 20 seconds
|
# harakiri parameter respawns processes taking more than 20 seconds
|
||||||
# max-requests parameter respawns processes after serving 5000 requests
|
# max-requests parameter respawns processes after serving 5000 requests
|
||||||
# vacuum parameter cleans up when stopped
|
# vacuum parameter cleans up when stopped
|
||||||
uwsgi --chdir="$(pwd)" \
|
uwsgi --socket "$(pwd)/uwsgi.sock" --chmod-socket=600 --master --plugins python3 \
|
||||||
--module=med.wsgi:application \
|
--module med.wsgi:application --env DJANGO_SETTINGS_MODULE=med.settings \
|
||||||
--env DJANGO_SETTINGS_MODULE=med.settings \
|
--processes 4 --harakiri=20 --max-requests=5000 --vacuum \
|
||||||
--master \
|
--static-map /static="$(pwd)/static"
|
||||||
--pidfile="$(pwd)/uwsgi.pid" \
|
|
||||||
--socket="$(pwd)/uwsgi.sock" \
|
#uwsgi --chdir="$(pwd)" \
|
||||||
--processes=5 \
|
# --pidfile="$(pwd)/uwsgi.pid" \
|
||||||
--chmod-socket=600 \
|
# --daemonize="$(pwd)/uwsgi.log" \
|
||||||
--harakiri=20 \
|
# --protocol=fastcgi
|
||||||
--max-requests=5000 \
|
|
||||||
--vacuum \
|
|
||||||
--daemonize="$(pwd)/uwsgi.log" \
|
|
||||||
--protocol=fastcgi
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
Django==2.2.10
|
Django~=2.2.10
|
||||||
docutils==0.14
|
docutils~=0.14
|
||||||
Pillow==5.4.1
|
Pillow~=5.4.1
|
||||||
pytz==2019.1
|
pytz~=2019.1
|
||||||
six==1.12.0
|
six~=1.12.0
|
||||||
sqlparse==0.2.4
|
sqlparse~=0.2.4
|
||||||
django-cas-client==1.5.3
|
django-cas-client~=1.2.0
|
||||||
django-reversion==3.0.3
|
django-reversion~=3.0.3
|
||||||
python-stdnum==1.10
|
python-stdnum~=1.10
|
||||||
djangorestframework==3.9.2
|
djangorestframework~=3.9.0
|
||||||
pyyaml==3.13
|
pyyaml~=3.13
|
||||||
coreapi==2.3.3
|
coreapi~=2.3.3
|
||||||
psycopg2-binary
|
uwsgi~=2.0.18
|
||||||
uwsgi==2.0.18
|
mysqlclient~=1.4.0
|
||||||
|
20
tox.ini
20
tox.ini
@ -1,38 +1,30 @@
|
|||||||
[tox]
|
[tox]
|
||||||
envlist = py35,py36,py37,py38,linters
|
envlist = py37,py38,linters
|
||||||
skipsdist = True
|
skipsdist = True
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
basepython = python3
|
sitepackages = True
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
-r{toxinidir}/requirements.txt
|
||||||
coverage
|
coverage
|
||||||
commands =
|
commands =
|
||||||
./manage.py makemigrations
|
coverage run --omit='*migrations*' ./manage.py test {posargs}
|
||||||
coverage run ./manage.py test {posargs}
|
|
||||||
coverage report -m
|
coverage report -m
|
||||||
|
|
||||||
[testenv:pre-commit]
|
|
||||||
deps = pre-commit
|
|
||||||
commands =
|
|
||||||
pre-commit run --all-files --show-diff-on-failure
|
|
||||||
|
|
||||||
[testenv:linters]
|
[testenv:linters]
|
||||||
deps =
|
deps =
|
||||||
-r{toxinidir}/requirements.txt
|
|
||||||
flake8
|
flake8
|
||||||
flake8-colors
|
flake8-colors
|
||||||
|
flake8-django
|
||||||
flake8-import-order
|
flake8-import-order
|
||||||
flake8-typing-imports
|
flake8-typing-imports
|
||||||
pep8-naming
|
pep8-naming
|
||||||
pyflakes
|
pyflakes
|
||||||
pylint
|
|
||||||
commands =
|
commands =
|
||||||
flake8 logs media users
|
flake8 logs media users
|
||||||
pylint .
|
|
||||||
|
|
||||||
[flake8]
|
[flake8]
|
||||||
ignore = D203, W503, E203, I100, I201, I202, C901
|
ignore = W503, I100, I101
|
||||||
exclude =
|
exclude =
|
||||||
.tox,
|
.tox,
|
||||||
.git,
|
.git,
|
||||||
@ -44,7 +36,7 @@ exclude =
|
|||||||
.cache,
|
.cache,
|
||||||
.eggs,
|
.eggs,
|
||||||
*migrations*
|
*migrations*
|
||||||
max-complexity = 10
|
max-complexity = 15
|
||||||
import-order-style = google
|
import-order-style = google
|
||||||
application-import-names = flake8
|
application-import-names = flake8
|
||||||
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
|
format = ${cyan}%(path)s${reset}:${yellow_bold}%(row)d${reset}:${green_bold}%(col)d${reset}: ${red_bold}%(code)s${reset} %(text)s
|
||||||
|
Loading…
Reference in New Issue
Block a user