Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Metagenomics
metagenedb
Commits
cd9b97c2
Commit
cd9b97c2
authored
Jun 18, 2019
by
Kenzo-Hugo Hillion
♻
Browse files
try to set up gitlab-ci
try to fix CI
parent
e89eb906
Changes
7
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
cd9b97c2
...
...
@@ -10,3 +10,6 @@ backend/public
# Jupyter notebook
notebooks/
.ipynb_checkpoints/
# Tests files
.coverage
.gitlab-ci.yml
0 → 100644
View file @
cd9b97c2
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
backend/.coveragerc
0 → 100644
View file @
cd9b97c2
[run]
omit =
metagenedb/wsgi.py
scripts/manage.py
setup.py
backend/metagenedb/settings-gitlab-ci.py
0 → 100644
View file @
cd9b97c2
from
metagenedb.settings
import
*
# noqa
DATABASES
=
{
'default'
:
{
'ENGINE'
:
'django.db.backends.postgresql_psycopg2'
,
'NAME'
:
'ci'
,
'USER'
:
'postgres'
,
'PASSWORD'
:
'postgres'
,
'HOST'
:
'postgres'
,
'PORT'
:
'5432'
,
},
}
backend/metagenedb/settings/django.py
View file @
cd9b97c2
...
...
@@ -107,7 +107,7 @@ DATABASES = {
'NAME'
:
'postgres'
,
'USER'
:
'postgres'
,
'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')
STATIC_URL
=
env
.
str
(
'STATIC_URL'
,
default
=
'/static/'
)
SECRET_KEY
=
env
.
str
(
'SECRET_KEY'
)
backend/pytest.ini
0 → 100644
View file @
cd9b97c2
[pytest]
DJANGO_SETTINGS_MODULE
=
backend.settings
python_files
=
tests.py test_*.py *_tests.py
\ No newline at end of file
backend/requirements_dev.txt
View file @
cd9b97c2
atomicwrites==1.3.0
attrs==19.1.0
backcall==0.1.0
bleach==3.1.0
decorator==4.4.0
defusedxml==0.6.0
coverage==4.5.3
Django==2.2.1
django-cors-headers==3.0.2
django-environ==0.4.5
django-extensions==2.1.7
djangorestframework==3.9.4
entrypoints==0.3
ipykernel==5.1.1
ipython==7.5.0
ipython-genutils==0.2.0
ipywidgets==7.4.2
jedi==0.13.3
Jinja2==2.10.1
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
flake8==3.7.7
importlib-metadata==0.18
mccabe==0.6.1
more-itertools==7.0.0
packaging==19.0
pluggy==0.12.0
psycopg2==2.8.2
ptyprocess==0.6.0
Pygments==2.4.0
pyrsistent==0.15.2
python-dateutil==2.8.0
py==1.8.0
pycodestyle==2.5.0
pyflakes==2.1.1
pyparsing==2.4.0
pytest==4.6.3
pytest-cov==2.7.1
pytz==2019.1
pyzmq==18.0.1
qtconsole==4.5.0
Send2Trash==1.5.0
six==1.12.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
webencodings==0.5.1
widgetsnbextension==3.4.2
flake8
zipp==0.5.1
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment