Add Coverage Report for Java and Python (#2667)

* Add coverage report for java

* Add coverage report for python

* Increase memory for JVM unit tests

* Increase memory for JVM unit tests
This commit is contained in:
Yun Ni 2017-09-05 14:46:51 -07:00 committed by Nan Zhu
parent 2e9d06443e
commit f04bde05fd
3 changed files with 26 additions and 3 deletions

View File

@ -58,7 +58,7 @@ addons:
before_install:
- source dmlc-core/scripts/travis/travis_setup_env.sh
- export PYTHONPATH=${PYTHONPATH}:${PWD}/python-package
- echo "MAVEN_OPTS='-Xmx2048m -XX:MaxPermSize=1024m -XX:ReservedCodeCacheSize=512m -Dorg.slf4j.simpleLogger.defaultLogLevel=error'" > ~/.mavenrc
- echo "MAVEN_OPTS='-Xmx4g -XX:MaxPermSize=1024m -XX:ReservedCodeCacheSize=512m -Dorg.slf4j.simpleLogger.defaultLogLevel=error'" > ~/.mavenrc
install:
- source tests/travis/setup.sh

View File

@ -215,6 +215,25 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.7.9</version>
<executions>
<execution>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<phase>test</phase>
<goals>
<goal>report</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>

View File

@ -32,8 +32,10 @@ if [ ${TASK} == "python_test" ]; then
source activate python3
python --version
conda install numpy scipy pandas matplotlib nose scikit-learn
python -m pip install graphviz
python -m pip install graphviz pytest pytest-cov codecov
python -m nose tests/python || exit -1
py.test tests/python --cov=python-package/xgboost
codecov
source activate python2
echo "-------------------------------"
python --version
@ -49,8 +51,10 @@ if [ ${TASK} == "python_lightweight_test" ]; then
source activate python3
python --version
conda install numpy scipy nose
python -m pip install graphviz
python -m pip install graphviz pytest pytest-cov codecov
python -m nose tests/python || exit -1
py.test tests/python --cov=python-package/xgboost
codecov
source activate python2
echo "-------------------------------"
python --version