From b69bf110efd3c1728281968508ca236bea75a907 Mon Sep 17 00:00:00 2001 From: Arin Wongprommoon <arin.wongprommoon@ed.ac.uk> Date: Wed, 11 Jan 2023 09:10:26 +0000 Subject: [PATCH] [WIP] ci: measure branch coverage WHY IS THIS CHANGE NEEDED?: - branch coverage give additional information re test coverage -- more informative for writing tests HOW DOES THE CHANGE SOLVE THE PROBLEM?: - add --branch flag, according to https://coverage.readthedocs.io/en/7.0.4/branch.html#how-to-measure-branch-coverage WHAT SIDE EFFECTS DOES THIS CHANGE HAVE?: - will change the coverage report and the final percent coverage REFERENCES: - issue #46 - merge request !8 --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 40d88775..d3ebdbae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -38,7 +38,7 @@ Local Tests: stage: tests script: # - poetry install -vv - - poetry run coverage run -m pytest ./tests --ignore ./tests/aliby/network --ignore ./tests/aliby/pipeline + - poetry run coverage run -m --branch pytest ./tests --ignore ./tests/aliby/network --ignore ./tests/aliby/pipeline - poetry run coverage report -m - poetry run coverage xml coverage: '/(?i)total.*? (100(?:\.0+)?\%|[1-9]?\d(?:\.\d+)?\%)$/' -- GitLab