Add after_success script for coverage upload
parent
082fa014a5
commit
c465688052
|
@ -17,12 +17,13 @@ matrix:
|
|||
include:
|
||||
- os: linux
|
||||
dist: trusty
|
||||
env: PYTHON_VERSION="3.6"
|
||||
env: PYTHON_VERSION="3.5"
|
||||
|
||||
- os: linux
|
||||
dist: trusty
|
||||
env: PYTHON_VERSION="2.7"
|
||||
env: PYTHON_VERSION="3.6"
|
||||
|
||||
install: source build_tools/travis/install.sh
|
||||
before_script: bash build_tools/travis/before_script.sh
|
||||
script: bash build_tools/travis/test_script.sh
|
||||
after_success: bash build_tools/travis/after_success.sh
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
[![Build Status](https://travis-ci.org/tgsmith61591/Hands-on-Supervised-Machine-Learning-with-Python.svg?branch=master)](https://travis-ci.org/tgsmith61591/Hands-on-Supervised-Machine-Learning-with-Python)
|
||||
|
||||
|
||||
# Hands-on-Supervised-Machine-Learning-with-Python
|
||||
|
||||
Published by Packt, Hands-on Supervised Machine Learning with Python
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
codecov || echo "Coverage upload failed"
|
|
@ -35,7 +35,7 @@ conda update --yes conda
|
|||
conda create -n testenv --yes python=${PYTHON_VERSION}
|
||||
source activate testenv
|
||||
pip install -r requirements.txt
|
||||
pip install pytest pytest-cov
|
||||
pip install pytest pytest-cov coverage codecov
|
||||
|
||||
# set up the package
|
||||
python setup.py install
|
||||
|
|
|
@ -3,15 +3,8 @@
|
|||
set -e
|
||||
|
||||
run_tests() {
|
||||
oldpwd=`pwd`
|
||||
|
||||
# Move to another directory to test
|
||||
cd ..
|
||||
mkdir -p ${TEST_DIR} && cd ${TEST_DIR}
|
||||
# run the tests with coverage
|
||||
pytest --cov packtml
|
||||
|
||||
# move back to original dir
|
||||
cd ${oldpwd}
|
||||
}
|
||||
|
||||
run_tests
|
||||
|
|
Loading…
Reference in New Issue