Skip to content

Commit

Permalink
Include test coverage reports with python's coverage.py and codecov
Browse files Browse the repository at this point in the history
We generate a new report on each push and upload it for coverage
analysis using the CI.
  • Loading branch information
pevogam committed Dec 3, 2019
1 parent 45777c3 commit b9fcd1a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ before_script:
# run tests
script:
- if [[ $INSTALL_VARIANT != "pip" ]]; then cd packaging && bash packager_docker.sh; else cd tests && bash run_tests.sh; fi
- if [[ $INSTALL_VARIANT == "pip" ]]; then codecov; fi

# use this to disable email notifications (e.g. while testing configuration)
#notifications:
Expand Down
3 changes: 3 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
codecov:
notify:
require_ci_to_pass: no
1 change: 1 addition & 0 deletions packaging/pip_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# minimal
coverage==4.5.1
codecov==2.0.15
Pillow==6.2.0

# backends
Expand Down
2 changes: 1 addition & 1 deletion tests/run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ set -e
readonly libpath="${LIBPATH:-../guibot}"
readonly coverage="${COVERAGE:-coverage3}"

$coverage run --source="$libpath" -m unittest discover -v
$coverage run --source="$libpath" -m unittest discover -s ../tests/
$coverage report -m

0 comments on commit b9fcd1a

Please sign in to comment.