Skip to content

Commit

Permalink
codecov: Default 85% coverage target
Browse files Browse the repository at this point in the history
Also switch to branch, rather than line, coverage.
  • Loading branch information
wence- committed Oct 24, 2016
1 parent e6db8c3 commit f5966af
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 1 deletion.
6 changes: 6 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
comment:
layout: "header, diff, changes"

coverage:
status:
project:
default:
target: 85
19 changes: 19 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[run]
branch = True

[report]
# Regexes for lines to exclude from consideration
exclude_lines =
# Have to re-enable the standard pragma
pragma: no cover

# Don't complain about missing debug-only code:
def __repr__

# Don't complain if tests don't hit defensive assertion code:
raise AssertionError
raise NotImplementedError

# Don't complain if non-runnable code isn't run:
if 0:
if __name__ == .__main__.:
3 changes: 2 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ env:
- FIREDRAKE_TRAVIS_TESTS=1
- PACKAGE_MANAGER="--no-package-manager"
- SLEPC="--slepc"
- COVERAGE_DIRS="--cov firedrake"
matrix:
- PYOP2_BACKEND=none
matrix:
Expand Down Expand Up @@ -87,7 +88,7 @@ install:
script:
- cd firedrake/src
- (cd firedrake; make lint)
- (cd firedrake; rc=0; for t in ${PYOP2_TESTS}; do py.test --cov-append --cov firedrake --short -v tests/${t} || rc=$?; done; exit $rc)
- (cd firedrake; rc=0; for t in ${PYOP2_TESTS}; do py.test --cov-append ${COVERAGE_DIRS} --short -v tests/${t} || rc=$?; done; exit $rc)
- if [ "x$TEST_ADJOINT" != "x" ]; then python dolfin-adjoint/tests_firedrake/test.py; fi
after_success:
- (cd firedrake; bash <(curl -s https://codecov.io/bash))

0 comments on commit f5966af

Please sign in to comment.