python - 使用来自 github-actions 的 python-coveralls 返回“无法提交覆盖范围:422 客户端错误”
问题描述
Coveralls python 包装器 ( python-coveralls ) 最近收到了重大更新 (2.2.0 -> 3.0.0),我的 github-actions 工作流程不再运行。
这是我的工作流程的相关部分:
test:
runs-on: ubuntu-latest
steps:
{... non-relevant steps...}
- name: Run test suite
run: tox -e $(echo py${{ matrix.python-version }}-mg${{ matrix.PYMONGO }} | tr -d . | sed -e 's/pypypy/pypy/') -- -a "--cov=my_project"
- name: Send coverage to Coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: coveralls
这曾经与以前版本的python-coveralls一起工作,所以tox
命令不是问题
这是我收到的错误:
Submitting coverage to coveralls.io...
Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
resubmitting with id None-158455276967659442
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/coveralls/api.py", line 252, in wear
response.raise_for_status()
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/coveralls/cli.py", line 85, in main
result = coverallz.wear()
File "/opt/hostedtoolcache/Python/3.7.9/x64/lib/python3.7/site-packages/coveralls/api.py", line 255, in wear
raise CoverallsException('Could not submit coverage: {}'.format(e))
coveralls.exception.CoverallsException: Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs
解决方案
您可以尝试在发行说明中添加服务名称作为状态并在此处提及: https ://github.com/coveralls-clients/coveralls-python/issues/251
run: coveralls --service=github
推荐阅读
- android - 这
元素必须是 元素 - javascript - 一个组件的 Redux 状态更改未触发另一个组件中的 useEffect
- angular - ngb 工具提示在 ngFor 循环中不起作用
- flutter - 在 Flutter 样本上创建发票的形式
- flutter - 颤振permission_handler构建失败
- c++ - 在 C++ 中查找 char 数组的大小
- kubernetes-pvc - 在动态配置存储类中调整 PVC 大小
- java - 从 Maven 的父 POM 中的子节点获取版本
- java - H2 1.4.199 数据库 getGeneratedKeys() 返回另一个插入事务生成的密钥或未来对象混在一起
- tensorflow - 为什么在将 ONNX 模型转换为 Tensorflow 时会丢失信息?