Skip to content

Commit

Permalink
Integrating Coverage.py with cesium (#211)
Browse files Browse the repository at this point in the history
Add code coverage
  • Loading branch information
stefanv committed Nov 14, 2016
2 parents f91ac68 + 1a318a4 commit ef05c4e
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 8 deletions.
12 changes: 12 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Configuration for coverage.py

[run]
branch = True
source = cesium
include = */cesium/*

[report]
exclude_lines =
def __repr__
if __name__ == .__main__.:
show_missing = True
1 change: 1 addition & 0 deletions .drone/travis_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ section_end "build.cython.extensions"
section "configure.cesium"
pip install -e .
section_end "configure.cesium"

6 changes: 4 additions & 2 deletions .drone/travis_script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ source ~/envs/cesium/bin/activate

section "Tests"

make ${TEST_TARGET}
if [[ $COVERAGE==1 ]]; then
NOSE_FLAGS='--with-coverage'
fi
nosetests -v --exe $NOSE_FLAGS

section_end "Tests"


section "Build.docs"

if [[ $SKIP_DOCS != 1 ]]; then
Expand Down
12 changes: 6 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,14 +72,11 @@ matrix:
include:
- python: 2.7
env:
- TEST_TARGET=test
- SKIP_DOCS=1
- python: 3.4
env:
- TEST_TARGET=test
- python: 3.5
env:
- TEST_TARGET=test
env:
- COVERAGE=1
- DEPLOY_DOCS=1

before_install:
Expand All @@ -93,4 +90,7 @@ install:

script: .drone/travis_script.sh

after_success: .drone/deploy_docs.sh
after_success:
- .drone/deploy_docs.sh
- pip install codecov
- codecov
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ xarray>=0.8.1
gatspy>=0.3.0
netCDF4
cloudpickle
coverage

0 comments on commit ef05c4e

Please sign in to comment.