From 0232953260a0eb3b4f31dcc7b0b0eb087043a6fa Mon Sep 17 00:00:00 2001 From: Skia Date: Tue, 29 Aug 2017 15:13:09 +0200 Subject: [PATCH] CI: add coverage report Signed-off-by: Skia --- .coveragerc | 14 ++++++++++++++ .gitlab-ci.yml | 10 ++++++++-- README.md | 3 +++ 3 files changed, 25 insertions(+), 2 deletions(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 00000000..d89ea21b --- /dev/null +++ b/.coveragerc @@ -0,0 +1,14 @@ +[run] +source = . +branch = False +omit = + *test* + */migrations/* + doc/* + env/* +[report] +show_missing = False +include = *.py +[html] +title = Sith Code Coverage +directory = coverage_report diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d1d6ed6a..30b00fce 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,5 +3,11 @@ test: - apt-get update - apt-get install -y gettext - pip install -r requirements.txt - - python manage.py compilemessages - - python manage.py test + - pip install coverage + - ./manage.py compilemessages + - coverage run ./manage.py test + - coverage html + - coverage report + artifacts: + paths: + - coverage_report/ diff --git a/README.md b/README.md index 98e8495f..775b22a6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ +[![pipeline status](https://ae-dev.utbm.fr/ae/Sith/badges/master/pipeline.svg)](https://ae-dev.utbm.fr/ae/Sith/commits/master) +[![coverage report](https://ae-dev.utbm.fr/ae/Sith/badges/master/coverage.svg)](https://ae-dev.utbm.fr/ae/Sith/commits/master) + ## Sith AE ### Get started