微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

coveralls 无法向coveralls.io 发送报告,bagde 仍然“未知”

如何解决coveralls 无法向coveralls.io 发送报告,bagde 仍然“未知”

我仍然在配置工作服时遇到问题。 Coveralls 在 Travis CI 中成功运行并且报告可见但是,after success,出现以下错误

---------- 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'

因此,我的回购工作服徽章仍然未知,我的工作服.io 帐户上也看不到任何报告。

我将我的 .travis.yml 配置如下;

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 
  

谁能帮我修一下?提前致谢!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。