Skip to content

Commit

Permalink
MNT: Make CI services always upload coverage.
Browse files Browse the repository at this point in the history
Also explicitly configure codecov to report status in event of CI
failure. This should fix codecov staying in pending state on failed
builds (Fixes Unidata#240)
  • Loading branch information
dopplershift committed Nov 21, 2016
1 parent 421fbc4 commit 7e9dd28
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Expand Up @@ -120,7 +120,7 @@ script:
python setup.py test --addopts "$TEST_OPTS";
fi

after_success:
after_script:
- if [[ $TASK == "coverage" ]]; then
pip install codecov codacy-coverage codeclimate-test-reporter;
codecov -e TRAVIS_PYTHON_VERSION;
Expand Down
6 changes: 3 additions & 3 deletions appveyor.yml
Expand Up @@ -41,10 +41,10 @@ test_script:
- cmd: set TEST_DATA_DIR=%APPVEYOR_BUILD_FOLDER%\\testdata
- cmd: if %PYTHON_VERSION% == 2.7 find examples\notebooks -name "*.ipynb" -exec sed -i -e s/python3/python2/ {} ;
- cmd: python setup.py test --addopts "--junitxml=tests.xml --flake8 --mpl --cov=metpy"
- ps: $wc = New-Object 'System.Net.WebClient'
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\tests.xml))
- cmd: find examples\notebooks\ -name "*.ipynb" -print0 | xargs -0 -n1 jupyter nbconvert --execute --ExecutePreprocessor.timeout=200 --ExecutePreprocessor.kernel_name=devel --inplace

after_test:
on_finish:
- ps: $wc = New-Object 'System.Net.WebClient'
- ps: $wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)", (Resolve-Path .\tests.xml))
- cmd: pip install codecov
- cmd: codecov -e PYTHON_VERSION PLATFORM
6 changes: 6 additions & 0 deletions codecov.yml
Expand Up @@ -3,8 +3,14 @@ coverage:
patch:
default:
target: '80'
if_no_uploads: error
if_not_found: success
if_ci_failed: error
project:
default:
target: auto
if_no_uploads: error
if_not_found: success
if_ci_failed: error

comment: off

0 comments on commit 7e9dd28

Please sign in to comment.