Skip to content

Commit

Permalink
Bump coverage report precision to 2 decimal places
Browse files Browse the repository at this point in the history
Now that we're above 99% coverage, it helps GitLab CI's coverage
parser to turn the precision returned by "coverage report" up by
two notches:

* Add a precision setting to [coverage:report] in tox.ini
* Update the coverage regex in .gitlab-ci.yml to account for the
  decimal point
  • Loading branch information
fghaas committed Mar 20, 2019
1 parent 3ffce6d commit 3f65c27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ coverage:
- python -m coverage combine
- python -m coverage html
- python -m coverage report
coverage: '/TOTAL.*\s+(\d+%)$/'
coverage: '/TOTAL.*\s+(\d+\.\d+%)$/'
artifacts:
paths:
- htmlcov
Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ include =
olxutils/*.py
tests/*.py

[coverage:report]
precision = 2

[testenv]
commands =
coverage run -m unittest discover tests {posargs}
Expand Down

0 comments on commit 3f65c27

Please sign in to comment.