I have tried multiple ways to debug this, but to no avail.
我尝试了多种方法进行调试,但都无济于事。
I have a situation where my coverage job in the Github Actions CI workflow for an open source I forked is unable to do so.
我有一种情况,我在Github Actions CI工作流中为我派生的一个开放源码无法做到这一点。
The original package was called django_ltree
. I wanted to keep the app with the same name but the package named differently as the repo seems to be unmaintained and I wanted to separate from the original source.
最初的包被命名为django_ltree。我想让应用程序保持相同的名称,但与repo命名不同的包似乎没有维护,我想从原始源代码中分离出来。
For some reason, the github ci keep failing at the combining coverage part.
由于某些原因,GitHub ci在合并覆盖部分一直失败。
So i have tried everything including renaming it to the new name greendeploy_django_ltree
所以我尝试了所有方法,包括将其重命名为greenploy_django_ltree
The GitHub ci still fails at the same spot.
GitHub的Ci仍然在同一地点出现故障。
This is the url for the above screenshot.
这是上面屏幕截图的URL。
https://github.com/GreenDeploy-io/greendeploy-django-ltree/actions/runs/6131727755/job/16641968397
Https://github.com/GreenDeploy-io/greendeploy-django-ltree/actions/runs/6131727755/job/16641968397
This is my workflow file: https://github.com/GreenDeploy-io/greendeploy-django-ltree/actions/runs/6131727755/workflow
这是我的工作流文件:https://github.com/GreenDeploy-io/greendeploy-django-ltree/actions/runs/6131727755/workflow
As you can see at
如您所见,
- name: Debug coverage data before combining
run: python -m coverage debug data
- name: Debug - Check if .coverage exists
run: test -f .coverage && echo ".coverage exists" || echo ".coverage does NOT exist"
# previously: python -m coverage combine ./.coverage # specify the file
- name: Combine coverage data
run: |
python -m coverage combine
I tried to debug and the .coverage file did exists. And when I debug, you can clearly see that coverage data states which lines are covered.
我尝试进行调试,但.overage文件确实存在。当我调试时,您可以清楚地看到覆盖率数据说明了哪些行被覆盖。
But for some reason, when it comes to combine, it goes haywired.
但出于某种原因,当涉及到合并时,它就会变得混乱不堪。
I have commented out the various matrix so that it runs faster. but I envisioned putting it back on.
我已经注释掉了各种矩阵,以便它运行得更快。但我想把它穿回去。
I honestly don't know what's wrong
我真的不知道出了什么问题
my pytest.ini
我的pyest.ini
[pytest]
addopts = --strict-markers --cov=greendeploy_django_ltree --cov-report=term-missing --cov-config=.coveragerc --cov-report=term
python_files = test_*.py
my .coveragerc
coveragerc
[run]
omit =
**/migrations/*
All my tests are running successfully except for this issue with the combining coverage.
我的所有测试都运行得很成功,除了组合覆盖率的这个问题。
更多回答
我是一名优秀的程序员,十分优秀!