From fac0413c9ef549322325c1a875e1490b0553a128 Mon Sep 17 00:00:00 2001 From: Fenn-25 Date: Thu, 12 Jul 2018 00:46:37 +0100 Subject: [PATCH 1/2] added coveralls support Signed-off-by: Fenn-25 --- .coveragerc | 10 ++++++++++ .gitignore | 2 ++ .travis.yml | 5 ++++- 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..1fdd26a1 --- /dev/null +++ b/.coveragerc @@ -0,0 +1,10 @@ +[report] +omit = + */migrations/* + */tests/* + manage.py + infohub/systers_portal/* + */admin.py + */site-packages/* +[html] +directory = reports/htmlcov diff --git a/.gitignore b/.gitignore index 43980989..7c155f28 100755 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ submit/ *.DS_Store */migrations/ credentials.json +.pytest_cache +.coverage diff --git a/.travis.yml b/.travis.yml index 13e627c8..d972faef 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ python: - "3.6" install: - "pip3 install -r requirements.txt" + - "pip install coveralls" before_script: - psql -c "create role myuser with createrole createdb login password 'mypassword';" -U postgres - psql -c "create database webapp;" -U postgres @@ -15,4 +16,6 @@ script: - python3 manage.py migrate --fake-initial - python3 manage.py makemigrations infohub malaria_web pcsa pcsa_GHN pcsa_safety_tools - python3 manage.py migrate --fake-initial -# - python3 manage.py test --settings=infohub.settings + - coverage run manage.py test --settings=infohub.settings +after_success: + coveralls --rcfile=.coveragerc From 47b19b20d565906d9624d8e91dc10c77ffb85d26 Mon Sep 17 00:00:00 2001 From: Fenn-25 Date: Thu, 12 Jul 2018 11:00:12 +0100 Subject: [PATCH 2/2] updated to pip3 Signed-off-by: Fenn-25 --- .coveragerc | 3 +-- .travis.yml | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.coveragerc b/.coveragerc index 1fdd26a1..aee894b1 100644 --- a/.coveragerc +++ b/.coveragerc @@ -6,5 +6,4 @@ omit = infohub/systers_portal/* */admin.py */site-packages/* -[html] -directory = reports/htmlcov + diff --git a/.travis.yml b/.travis.yml index d972faef..4462652c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,7 +6,7 @@ python: - "3.6" install: - "pip3 install -r requirements.txt" - - "pip install coveralls" + - "pip3 install coveralls" before_script: - psql -c "create role myuser with createrole createdb login password 'mypassword';" -U postgres - psql -c "create database webapp;" -U postgres