Skip to content

CI: add in support for coverage via Codecov #12632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,26 +36,26 @@ matrix:
- LOCALE_OVERRIDE="zh_CN.GB18030"
- FULL_DEPS=true
- JOB_TAG=_LOCALE
- BUILD_TYPE=conda
- python: 2.7
env:
- JOB_NAME: "27_nslow"
- NOSE_ARGS="not slow and not disabled"
- FULL_DEPS=true
- CLIPBOARD_GUI=gtk2
- LINT=true
- python: 3.4
env:
- JOB_NAME: "34_nslow"
- NOSE_ARGS="not slow and not disabled"
- FULL_DEPS=true
- CLIPBOARD=xsel
- BUILD_TYPE=conda
- python: 3.5
env:
- JOB_NAME: "35_nslow"
- NOSE_ARGS="not slow and not network and not disabled"
- FULL_DEPS=true
- CLIPBOARD=xsel
- COVERAGE=true
- python: 2.7
env:
- JOB_NAME: "27_slow"
Expand Down Expand Up @@ -87,14 +87,12 @@ matrix:
- JOB_NAME: "27_nslow_nnet_COMPAT"
- NOSE_ARGS="not slow and not network and not disabled"
- LOCALE_OVERRIDE="it_IT.UTF-8"
- BUILD_TYPE=conda
- INSTALL_TEST=true
- JOB_TAG=_COMPAT
- python: 2.7
env:
- JOB_NAME: "doc_build"
- FULL_DEPS=true
- BUILD_TYPE=conda
- DOC_BUILD=true # if rst files were changed, build docs in parallel with tests
- JOB_TAG=_DOC_BUILD
allow_failures:
Expand Down Expand Up @@ -129,14 +127,12 @@ matrix:
- JOB_NAME: "27_nslow_nnet_COMPAT"
- NOSE_ARGS="not slow and not network and not disabled"
- LOCALE_OVERRIDE="it_IT.UTF-8"
- BUILD_TYPE=conda
- INSTALL_TEST=true
- JOB_TAG=_COMPAT
- python: 2.7
env:
- JOB_NAME: "doc_build"
- FULL_DEPS=true
- BUILD_TYPE=conda
- DOC_BUILD=true
- JOB_TAG=_DOC_BUILD

Expand All @@ -159,14 +155,17 @@ install:
- ci/submit_ccache.sh

before_script:
- source activate pandas && pip install codecov
- ci/install_db.sh

script:
- echo "script"
- ci/run_build_docs.sh
- ci/script.sh
- ci/lint.sh
# nothing here, or failed tests won't fail travis

after_success:
- source activate pandas && codecov

after_script:
- ci/install_test.sh
Expand Down
2 changes: 1 addition & 1 deletion ci/install_travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ conda info -a || exit 1

# build deps
REQ="ci/requirements-${TRAVIS_PYTHON_VERSION}${JOB_TAG}.build"
time conda create -n pandas python=$TRAVIS_PYTHON_VERSION nose flake8 || exit 1
time conda create -n pandas python=$TRAVIS_PYTHON_VERSION nose coverage flake8 || exit 1

# may have additional installation instructions for this build
INSTALL="ci/install-${TRAVIS_PYTHON_VERSION}${JOB_TAG}.sh"
Expand Down
22 changes: 14 additions & 8 deletions ci/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,19 @@ echo "inside $0"
source activate pandas

RET=0
for path in 'core' 'io' 'stats' 'compat' 'sparse' 'tools' 'tseries' 'tests' 'computation' 'util'
do
echo "linting -> pandas/$path"
flake8 pandas/$path --filename '*.py'
if [ $? -ne "0" ]; then
RET=1
fi
done

if [ "$LINT" ]; then
echo "Linting"
for path in 'core' 'io' 'stats' 'compat' 'sparse' 'tools' 'tseries' 'tests' 'computation' 'util'
do
echo "linting -> pandas/$path"
flake8 pandas/$path --filename '*.py'
if [ $? -ne "0" ]; then
RET=1
fi
done
else
echo "NOT Linting"
fi

exit $RET
3 changes: 3 additions & 0 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ fi

if [ "$BUILD_TEST" ]; then
echo "We are not running nosetests as this is simply a build test."
elif [ "$COVERAGE" ]; then
echo nosetests --exe -A "$NOSE_ARGS" pandas --with-coverage --with-xunit --xunit-file=/tmp/nosetests.xml
nosetests --exe -A "$NOSE_ARGS" pandas --with-coverage --cover-package=pandas --cover-tests --with-xunit --xunit-file=/tmp/nosetests.xml
else
echo nosetests --exe -A "$NOSE_ARGS" pandas --doctest-tests --with-xunit --xunit-file=/tmp/nosetests.xml
nosetests --exe -A "$NOSE_ARGS" pandas --doctest-tests --with-xunit --xunit-file=/tmp/nosetests.xml
Expand Down