From 966146290061bf56ea27014eb253d58c969720fb Mon Sep 17 00:00:00 2001 From: Divyam Madaan Date: Tue, 17 Oct 2017 15:46:36 +0530 Subject: [PATCH] Add codecov code coverage Closes https://github.com/pclubuiet/website/issues/110 --- .coveragerc | 3 +++ .travis.yml | 3 +++ codecov.yml | 26 ++++++++++++++++++++++++++ requirements.txt | 13 +++++++++++++ 4 files changed, 45 insertions(+) create mode 100644 .coveragerc create mode 100644 codecov.yml diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000..95a7a2a --- /dev/null +++ b/.coveragerc @@ -0,0 +1,3 @@ +[run] +branch = True +omit = site-packages diff --git a/.travis.yml b/.travis.yml index 80e4d80..93d59d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,3 +11,6 @@ script: - python manage.py migrate - python manage.py collectstatic - python manage.py test + - nosetests --with-coverage +after_success: + - codecov diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..4a11b71 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,26 @@ +codecov: + notify: + require_ci_to_pass: yes + +coverage: + precision: 2 + round: down + range: "70...100" + + status: + project: yes + patch: yes + changes: no + +parsers: + gcov: + branch_detection: + conditional: yes + loop: yes + method: no + macro: no + +comment: + layout: "reach, diff, flags, files, footer" + behavior: default + require_changes: no diff --git a/requirements.txt b/requirements.txt index 0837a39..b518690 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,19 @@ +certifi==2017.7.27.1 +chardet==3.0.4 +codecov==2.0.9 +coverage==4.4.1 dj-database-url==0.4.2 Django==1.11.5 gunicorn==19.7.1 +idna==2.6 +nose==1.3.7 +nose2==0.6.5 psycopg2==2.7.3.1 +py==1.4.34 pytz==2017.2 +pytest==3.2.3 +pytest-cov==2.5.1 +requests==2.18.4 +six==1.11.0 +urllib3==1.22 whitenoise==3.3.1