Skip to content

Commit

Permalink
re-enable coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
chyikwei committed Jan 7, 2021
1 parent 846008e commit 5ef4002
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 20 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cache:
env:
global:
# Directory where tests are run from
- TEST_DIR=/tmp/test_dir/
- TEST_DIR=/tmp/test_dir
- MODULE=tensor_lda

install: source ci_scripts/travis/install.sh
Expand Down
20 changes: 9 additions & 11 deletions ci_scripts/travis/success.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
set -e

if [[ "$COVERAGE" == "true" ]]; then
# Need to run coveralls 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
# 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"
fi
# Need to run coveralls 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
# 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"
11 changes: 3 additions & 8 deletions ci_scripts/travis/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,7 @@ set -e

# Get into a temp directory to run test from the installed scikit learn and
# check if we do not leave artifacts
mkdir -p $TEST_DIR
mkdir -p $TEST_DIR/

cd $TEST_DIR

if [[ "$COVERAGE" == "true" ]]; then
nosetests -s --with-coverage --cover-package=$MODULE $MODULE
else
nosetests -s $MODULE
fi
cd $TEST_DIR/
nosetests -s --with-coverage --cover-package=$MODULE $MODULE
2 changes: 2 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ numpy>=1.11.2
scipy>=0.18.1
scikit-learn>=0.17
Cython>=0.21
coverage>=5.3.1
coveralls>=2.2.0

0 comments on commit 5ef4002

Please sign in to comment.