Skip to content
Snippets Groups Projects
Commit cd9b97c2 authored by Kenzo-Hugo Hillion's avatar Kenzo-Hugo Hillion :recycle:
Browse files

try to set up gitlab-ci

try to fix CI
parent e89eb906
No related branches found
No related tags found
No related merge requests found
...@@ -10,3 +10,6 @@ backend/public ...@@ -10,3 +10,6 @@ backend/public
# Jupyter notebook # Jupyter notebook
notebooks/ notebooks/
.ipynb_checkpoints/ .ipynb_checkpoints/
# Tests files
.coverage
image: python:3.7
stages:
- lint_test_coverage_backend
# Pick zero or more services to be used on all builds.
# Only needed when using a docker container to run your tests in.
# Check out: http://docs.gitlab.com/ce/ci/docker/using_docker_images.html#what-is-a-service
services:
- postgres:latest
variables:
POSTGRES_DB: postgres
# This folder is cached between builds
# http://docs.gitlab.com/ce/ci/yaml/README.html#cache
cache:
paths:
- ~/.cache/pip/
before_script:
- cd backend
- pip install -r requirements_dev.txt
- pip install .
test-backend:
stage: lint_test_coverage_backend
variables:
DATABASE_HOST: postgres
DJANGO_SETTINGS_MODULE: "metagenedb.settings-gitlab-ci"
script:
- flake8 --max-line-length 120
- coverage run --source='.' scripts/manage.py test metagenedb/tests
[run]
omit =
metagenedb/wsgi.py
scripts/manage.py
setup.py
from metagenedb.settings import * # noqa
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'ci',
'USER': 'postgres',
'PASSWORD': 'postgres',
'HOST': 'postgres',
'PORT': '5432',
},
}
...@@ -107,7 +107,7 @@ DATABASES = { ...@@ -107,7 +107,7 @@ DATABASES = {
'NAME': 'postgres', 'NAME': 'postgres',
'USER': 'postgres', 'USER': 'postgres',
'HOST': env.str('DATABASES_HOST', default='db'), 'HOST': env.str('DATABASES_HOST', default='db'),
'PORT': env.str('POSTGRES_PORT', default=5432), 'PORT': env.int('POSTGRES_PORT', default=5432),
} }
} }
...@@ -118,5 +118,3 @@ STATIC_ROOT = public_root('static') ...@@ -118,5 +118,3 @@ STATIC_ROOT = public_root('static')
STATIC_URL = env.str('STATIC_URL', default='/static/') STATIC_URL = env.str('STATIC_URL', default='/static/')
SECRET_KEY = env.str('SECRET_KEY') SECRET_KEY = env.str('SECRET_KEY')
[pytest]
DJANGO_SETTINGS_MODULE = backend.settings
python_files = tests.py test_*.py *_tests.py
\ No newline at end of file
atomicwrites==1.3.0
attrs==19.1.0 attrs==19.1.0
backcall==0.1.0 coverage==4.5.3
bleach==3.1.0
decorator==4.4.0
defusedxml==0.6.0
Django==2.2.1 Django==2.2.1
django-cors-headers==3.0.2 django-cors-headers==3.0.2
django-environ==0.4.5
django-extensions==2.1.7 django-extensions==2.1.7
djangorestframework==3.9.4 djangorestframework==3.9.4
entrypoints==0.3 entrypoints==0.3
ipykernel==5.1.1 flake8==3.7.7
ipython==7.5.0 importlib-metadata==0.18
ipython-genutils==0.2.0 mccabe==0.6.1
ipywidgets==7.4.2 more-itertools==7.0.0
jedi==0.13.3 packaging==19.0
Jinja2==2.10.1 pluggy==0.12.0
jsonschema==3.0.1
jupyter==1.0.0
jupyter-client==5.2.4
jupyter-console==6.0.0
jupyter-core==4.4.0
MarkupSafe==1.1.1
mistune==0.8.4
nbconvert==5.5.0
nbformat==4.4.0
notebook==5.7.8
pandocfilters==1.4.2
parso==0.4.0
pexpect==4.7.0
pickleshare==0.7.5
pkg-resources==0.0.0
prometheus-client==0.6.0
prompt-toolkit==2.0.9
psycopg2==2.8.2 psycopg2==2.8.2
ptyprocess==0.6.0 py==1.8.0
Pygments==2.4.0 pycodestyle==2.5.0
pyrsistent==0.15.2 pyflakes==2.1.1
python-dateutil==2.8.0 pyparsing==2.4.0
pytest==4.6.3
pytest-cov==2.7.1
pytz==2019.1 pytz==2019.1
pyzmq==18.0.1
qtconsole==4.5.0
Send2Trash==1.5.0
six==1.12.0 six==1.12.0
sqlparse==0.3.0 sqlparse==0.3.0
terminado==0.8.2
testpath==0.4.2
tornado==6.0.2
traitlets==4.3.2
wcwidth==0.1.7 wcwidth==0.1.7
webencodings==0.5.1 zipp==0.5.1
widgetsnbextension==3.4.2
flake8
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment