summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.codecov.yml10
-rw-r--r--.travis.yml2
-rw-r--r--README.md1
-rw-r--r--doc/source/dev/governance/people.rst4
-rw-r--r--tools/test-installed-numpy.py4
-rwxr-xr-xtools/travis-test.sh15
6 files changed, 32 insertions, 4 deletions
diff --git a/.codecov.yml b/.codecov.yml
new file mode 100644
index 000000000..5e5890588
--- /dev/null
+++ b/.codecov.yml
@@ -0,0 +1,10 @@
+codecov:
+ ci:
+ - !appveyor
+coverage:
+ status:
+ project:
+ default:
+ # Require 1% coverage, i.e., always succeed
+ target: 1
+comment: off
diff --git a/.travis.yml b/.travis.yml
index 6b010e58f..e428953e0 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -58,7 +58,7 @@ matrix:
- python3-dev
- python3-setuptools
- python: 3.6
- env: USE_WHEEL=1 RUN_FULL_TESTS=1
+ env: USE_WHEEL=1 RUN_FULL_TESTS=1 RUN_COVERAGE=1
- python: 2.7
env: USE_WHEEL=1 RUN_FULL_TESTS=1 PYTHON_OPTS="-3 -OO"
- python: 3.6
diff --git a/README.md b/README.md
index acdf43c45..605ecaf95 100644
--- a/README.md
+++ b/README.md
@@ -2,6 +2,7 @@
[![Travis](https://img.shields.io/travis/numpy/numpy/master.svg?label=Travis%20CI)](https://travis-ci.org/numpy/numpy)
[![AppVeyor](https://img.shields.io/appveyor/ci/charris/numpy/master.svg?label=AppVeyor)](https://ci.appveyor.com/project/charris/numpy)
+[![codecov](https://codecov.io/gh/numpy/numpy/branch/master/graph/badge.svg)](https://codecov.io/gh/numpy/numpy)
NumPy is the fundamental package needed for scientific computing with Python.
diff --git a/doc/source/dev/governance/people.rst b/doc/source/dev/governance/people.rst
index b22852a5a..7b8d3cab0 100644
--- a/doc/source/dev/governance/people.rst
+++ b/doc/source/dev/governance/people.rst
@@ -28,6 +28,8 @@ Steering council
* Allan Haldane
+* Stefan van der Walt
+
Emeritus members
----------------
@@ -54,7 +56,7 @@ NumFOCUS Subcommittee
Institutional Partners
----------------------
-* UC Berkeley (Nathaniel Smith)
+* UC Berkeley (Stefan van der Walt)
Document history
diff --git a/tools/test-installed-numpy.py b/tools/test-installed-numpy.py
index 04a2a1da2..14f11b7ed 100644
--- a/tools/test-installed-numpy.py
+++ b/tools/test-installed-numpy.py
@@ -46,6 +46,10 @@ elif numpy.ones((10, 1), order='C').flags.f_contiguous:
print('NPY_RELAXED_STRIDES_CHECKING not set, but active.')
sys.exit(1)
+if options.coverage:
+ # Produce code coverage XML report for codecov.io
+ args += ["--cov-report=xml"]
+
result = numpy.test(options.mode,
verbose=options.verbose,
extra_argv=args,
diff --git a/tools/travis-test.sh b/tools/travis-test.sh
index b99866f0d..11863b5fe 100755
--- a/tools/travis-test.sh
+++ b/tools/travis-test.sh
@@ -105,6 +105,11 @@ run_test()
export PYTHONPATH=$PWD
fi
+ if [ -n "$RUN_COVERAGE" ]; then
+ pip install pytest-cov
+ COVERAGE_FLAG=--coverage
+ fi
+
# We change directories to make sure that python won't find the copy
# of numpy in the source directory.
mkdir -p empty
@@ -113,10 +118,17 @@ run_test()
"import os; import numpy; print(os.path.dirname(numpy.__file__))")
export PYTHONWARNINGS=default
if [ -n "$RUN_FULL_TESTS" ]; then
- $PYTHON ../tools/test-installed-numpy.py -v --mode=full
+ export PYTHONWARNINGS="ignore::DeprecationWarning:virtualenv"
+ $PYTHON ../tools/test-installed-numpy.py -v --mode=full $COVERAGE_FLAG
else
$PYTHON ../tools/test-installed-numpy.py -v
fi
+
+ if [ -n "$RUN_COVERAGE" ]; then
+ # Upload coverage files to codecov
+ bash <(curl -s https://codecov.io/bash) -X gcov -X coveragepy
+ fi
+
if [ -n "$USE_ASV" ]; then
pushd ../benchmarks
$PYTHON `which asv` machine --machine travis
@@ -181,4 +193,3 @@ else
setup_base
run_test
fi
-