From 81f33fc41bd13b0861769d07b02e2f11d70f05c9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 30 Jan 2017 19:05:19 +0100 Subject: Makefile: add coverage support --- .gitignore | 1 + Makefile.example | 5 +++++ example_project/.coveragerc | 9 +++++++++ 3 files changed, 15 insertions(+) create mode 100644 example_project/.coveragerc diff --git a/.gitignore b/.gitignore index 6cde18e26..bfc61f6ac 100644 --- a/.gitignore +++ b/.gitignore @@ -23,3 +23,4 @@ ishtar.egg-info .idea *.log example_project/ishtar +example_project/.coverage diff --git a/Makefile.example b/Makefile.example index 59f82d7af..d251155ed 100644 --- a/Makefile.example +++ b/Makefile.example @@ -47,6 +47,11 @@ update: clean syncdb compilemessages collectstatic test: clean cd $(project); $(PYTHON) manage.py test $(apps) +coverage: clean + cd $(project); coverage run --source="ishtar_common,archaeological_operations,\ + archaeological_context_records,archaeological_files,archaeological_finds,archaeological_warehouse,\ + archaeological_files_pdl" ./manage.py test $(apps) && coverage report + test_gitlab: clean # test migrations cd $(project); $(PYTHON) ./manage.py syncdb --noinput diff --git a/example_project/.coveragerc b/example_project/.coveragerc new file mode 100644 index 000000000..43462778f --- /dev/null +++ b/example_project/.coveragerc @@ -0,0 +1,9 @@ +[report] +show_missing = True +exclude_lines = + pragma: no cover + raise NotImplementedError +[run] +omit = + */migrations/* + -- cgit v1.2.3