Navigation Menu

Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Commit

Permalink
Create coverage reports
Browse files Browse the repository at this point in the history
  • Loading branch information
WGierke committed Jan 11, 2018
1 parent a2b55a8 commit e9b5cb1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions prediction/requirements/local.txt
@@ -1,3 +1,4 @@
flake8==3.3.0
pytest==3.1.3
pylidc==0.1.9 # Fixes UnicodeDecodeError in to_volume() (https://github.com/pylidc/pylidc/issues/9)
coverage==4.4.2
8 changes: 6 additions & 2 deletions tests/test_docker.sh
Expand Up @@ -7,10 +7,14 @@
set -ex

# run the model service's tests
docker-compose -f local.yml run prediction pytest -rsx
# Coverage should ignore pip packets, files including tests and pytest
docker-compose -f local.yml run prediction coverage run --branch --omit=/**/dist-packages/*,src/tests/*,/usr/local/bin/pytest /usr/local/bin/pytest -rsx
docker-compose -f local.yml run prediction coverage report

# run the backend API tests
docker-compose -f local.yml run interface python manage.py test
# Coverage should ignore pip packets, files including migrations and tests
docker-compose -f local.yml run interface coverage run --branch --omit=/**/dist-packages/*,**/migrations/*.py,**/test*.py manage.py test
docker-compose -f local.yml run interface coverage report

# return non-zero status code if there are migrations that have not been created
docker-compose -f local.yml run interface python manage.py makemigrations --dry-run --check || { echo "ERROR: there were changes in the models, but migration listed above have not been created and are not saved in version control"; exit 1; }
Expand Down

0 comments on commit e9b5cb1

Please sign in to comment.