Commit 4f90b51f authored by Noe Nieto's avatar Noe Nieto 💬
Browse files

Add coverage

parent d27e4d98
......@@ -2,20 +2,32 @@ image: pureos/amber:latest
stages:
- test
- deb
test:
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
key: liberty-cache-key
paths:
- .cache/pip
- venv/
tags:
- librem5
- libremone
stage: test
script:
- echo "Hello world!"
# this configures Django application to use attached postgres database that is run on `postgres` host
- export DATABASE_URL=postgres://postgres:@postgres:5432/python-test-app
- apt-get update -qy
- apt-get install -y python3-dev python-pip pipenv libldap2-dev libpq-dev libsasl2-dev
- cp Pipfile.lock-Debian_stable Pipfile.lock
- pipenv install --dev
- pipenv install --verbose --three --dev --skip-lock
- pipenv run ./run_tests
- coverage xml
- flake8 .
coverage: "/TOTAL.+ ([0-9]{1,3}%)/"
artifacts:
paths:
- htmlcov
- docs/_build
deb:
tags:
- libremone
......
......@@ -2,4 +2,4 @@
export DJANGO_SETTINGS_MODULE="middleware.settings_tests"
export DJANGO_COLORS="dark"
./manage.py test $@
\ No newline at end of file
coverage run manage.py test $@
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment