I still faced trouble configuring coveralls. Coveralls successfully run in Travis CI and the report is visible BUT, after success
, the following error occurs:
---------- coverage: platform linux, python 3.7.10-final-0 -----------
Name Stmts Miss Branch BrPart Cover
-------------------------------------------------------------------------
tests/__init__.py 24 1 4 1 93%
tests/core/__init__.py 0 0 0 0 100%
tests/core/test_core.py 192 38 84 13 81%
tests/geodrill/__init__.py 19 16 10 0 10%
tests/geodrill/test_geodrill.py 106 30 48 10 70%
tests/modeling/__init__.py 42 5 18 3 87%
tests/modeling/test_occam2d_models.py 100 13 46 5 86%
tests/processing/__init__.py 10 0 2 0 100%
tests/processing/test_processing.py 47 7 18 2 86%
-------------------------------------------------------------------------
TOTAL 540 110 230 34 79%
0.03s$ coveralls
Traceback (most recent call last):
File "/home/travis/miniconda/envs/test-env/bin/coveralls", line 5, in <module>
from coveralls.cli import main
ModuleNotFoundError: No module named 'coveralls.cli'
Consequently, my repo coveralls badge is still unknown, and no report is visible on my coveralls.io account.
I configured my .travis.yml
as follow ;
dist: xenial
sudo: required
language: python
python:
- "3.7"
before_script: null
before_install:
- python -m pip install --upgrade pip
install:
- wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh -O miniconda.sh;
- bash miniconda.sh -b -p $HOME/miniconda
- export PATH="$HOME/miniconda/bin:$PATH"
- hash -r
- conda config --set always_yes yes --set changeps1 no
- conda update -q conda
- conda info -a
- conda create -q -n test-env python=$TRAVIS_PYTHON_VERSION pytest pytest-cov pyyaml
- source activate test-env
- pip install --user -r requirements.txt
- pip install configparser
- pip install coveralls
script:
- python -m pytest --cov=tests --cov-fail-under=50 # coveral fail threshold 50%
after_success:
- coveralls
Could anyone help me to fix it? thanks in advance!