From 26dcdfa105704b36a6d1f7f99709e9a832374d5d Mon Sep 17 00:00:00 2001 From: Jaques Grobler Date: Tue, 8 Oct 2013 10:31:02 +0200 Subject: [PATCH] add coverage test for travis --- .coveragerc | 8 ++++++++ .gitignore | 2 ++ .travis.yml | 8 +++++++- 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc new file mode 100644 index 0000000000000..460f5cd2b85be --- /dev/null +++ b/.coveragerc @@ -0,0 +1,8 @@ +[run] +branch = True +source = sklearn +include = */sklearn/* +omit = + */sklearn/externals/* + */benchmarks/* + */setup.py \ No newline at end of file diff --git a/.gitignore b/.gitignore index e562b996bee1e..2e04d26c866a6 100644 --- a/.gitignore +++ b/.gitignore @@ -35,6 +35,8 @@ samples doc/coverages doc/samples *.prof +.tox/ +.coverage lfw_preprocessed/ nips2010_pdf/ diff --git a/.travis.yml b/.travis.yml index 97a181abf8caa..b1db2411bc923 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,6 @@ language: python +env: + - COVERAGE=--with-coverage python: - "2.7" virtualenv: @@ -7,4 +9,8 @@ before_install: - sudo apt-get update -qq - sudo apt-get install -qq python-scipy python-nose install: python setup.py build_ext --inplace -script: make test + - if [ "${COVERAGE}" == "--with-coverage" ]; then + sudo $PIP install coverage; + fi +script: - make test + - if [ "${COVERAGE}" == "--with-coverage" ]; then make test-coverage; fi