From 77213592b70769fbd3b165b317a2282a7d0dfe05 Mon Sep 17 00:00:00 2001
From: Rishikesh <rishikksh20@gmail.com>
Date: Wed, 8 Feb 2017 12:07:57 +0530
Subject: [PATCH] [MRG+1] Enable codecov for coverage report (#8311)

* Replace coveralls from codecov for coverage report

Replacing code coverage tool from coveralls to codecov.

Issue: #8305

* Add codecov badge for coverage report

Replace coveralls badge from codecov badge
---
 README.rst                          | 6 +++---
 build_tools/travis/after_success.sh | 6 +++---
 build_tools/travis/install.sh       | 2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/README.rst b/README.rst
index 41abaa90a8..fc4d79e1bb 100644
--- a/README.rst
+++ b/README.rst
@@ -1,6 +1,6 @@
 .. -*- mode: rst -*-
 
-|Travis|_ |AppVeyor|_ |Coveralls|_ |CircleCI|_ |Python27|_ |Python35|_ |PyPi|_ |DOI|_
+|Travis|_ |AppVeyor|_ |Codecov|_ |CircleCI|_ |Python27|_ |Python35|_ |PyPi|_ |DOI|_
 
 .. |Travis| image:: https://api.travis-ci.org/scikit-learn/scikit-learn.svg?branch=master
 .. _Travis: https://travis-ci.org/scikit-learn/scikit-learn
@@ -8,8 +8,8 @@
 .. |AppVeyor| image:: https://ci.appveyor.com/api/projects/status/github/scikit-learn/scikit-learn?branch=master&svg=true
 .. _AppVeyor: https://ci.appveyor.com/project/sklearn-ci/scikit-learn/history
 
-.. |Coveralls| image:: https://coveralls.io/repos/scikit-learn/scikit-learn/badge.svg?branch=master&service=github
-.. _Coveralls: https://coveralls.io/r/scikit-learn/scikit-learn
+.. |Codecov| image:: https://codecov.io/github/scikit-learn/scikit-learn/badge.svg?branch=master&service=github
+.. _Codecov: https://codecov.io/github/scikit-learn/scikit-learn?branch=master
 
 .. |CircleCI| image:: https://circleci.com/gh/scikit-learn/scikit-learn/tree/master.svg?style=shield&circle-token=:circle-token
 .. _CircleCI: https://circleci.com/gh/scikit-learn/scikit-learn
diff --git a/build_tools/travis/after_success.sh b/build_tools/travis/after_success.sh
index a4613ccc70..aead28cb28 100755
--- a/build_tools/travis/after_success.sh
+++ b/build_tools/travis/after_success.sh
@@ -7,13 +7,13 @@
 set -e
 
 if [[ "$COVERAGE" == "true" ]]; then
-    # Need to run coveralls from a git checkout, so we copy .coverage
+    # Need to run codecov from a git checkout, so we copy .coverage
     # from TEST_DIR where nosetests has been run
     cp $TEST_DIR/.coverage $TRAVIS_BUILD_DIR
     cd $TRAVIS_BUILD_DIR
-    # Ignore coveralls failures as the coveralls server is not
+    # Ignore codecov failures as the codecov server is not
     # very reliable but we don't want travis to report a failure
     # in the github UI just because the coverage report failed to
     # be published.
-    coveralls || echo "Coveralls upload failed"
+    codecov || echo "codecov upload failed"
 fi
diff --git a/build_tools/travis/install.sh b/build_tools/travis/install.sh
index bc9f13f80d..85e0d174a1 100755
--- a/build_tools/travis/install.sh
+++ b/build_tools/travis/install.sh
@@ -95,7 +95,7 @@ elif [[ "$DISTRIB" == "scipy-dev-wheels" ]]; then
 fi
 
 if [[ "$COVERAGE" == "true" ]]; then
-    pip install coverage coveralls
+    pip install coverage codecov
 fi
 
 if [[ "$SKIP_TESTS" == "true" ]]; then
-- 
GitLab