CleanCut / green

Green is a clean, colorful, fast python test runner.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix lack of coverage in CI

sodul opened this issue · comments

Note that this is an internal CI issue and has no impact on users of green itself.

Green has high code coverage when running locally but in the GH actions we have almost no coverage.

We should identify the root cause and fix it.

Local:

> ./g -r green
...................................................................................................................s....................................................................................................................s

Skipped green.test.test_output.TestGreenStream.testDisableWindowsFalse - Colorama won't strip ANSI unless running on Windows

Skipped green.test.test_windows.TestWindows.test_colorOutput - This test is for windows-specific behavior.

Name                     Stmts   Miss  Cover   Missing
------------------------------------------------------
green/__init__.py            2      2     0%   1-3
green/__main__.py            3      3     0%   1-5
green/cmdline.py            61     13    79%   90-105
green/command.py            46      0   100%
green/config.py              0      0   100%
green/djangorunner.py       62      0   100%
green/examples.py           27     27     0%   1-69
green/exceptions.py          3      0   100%
green/junit.py             123      0   100%
green/loader.py            264      0   100%
green/output.py            101      0   100%
green/process.py            54      0   100%
green/result.py            412      3    99%   205, 223, 342
green/runner.py             73      0   100%
green/suite.py             126     13    90%   109, 113-116, 128-133, 139-142
green/test/__init__.py       0      0   100%
green/version.py             0      0   100%
------------------------------------------------------
TOTAL                     1357     61    96%

Ran 233 tests in 5.761s using 10 processes

OK (passes=231, skips=2)

CI:

Name                    Stmts   Miss  Cover   Missing
-----------------------------------------------------
green/__init__.py           2      2     0%   1-3
green/__main__.py           3      3     0%   1-5
green/cmdline.py           61     61     0%   3-107
green/command.py           46     46     0%   3-74
green/config.py            87     87     0%   612-831
green/djangorunner.py      62     62     0%   11-142
green/examples.py          27     27     0%   1-69
green/exceptions.py         3      3     0%   1-5
green/junit.py            123    123     0%   3-221
green/loader.py           264    264     0%   1-550
green/output.py           101    101     0%   1-218
green/process.py           54     54     0%   5-287
green/result.py           412    412     0%   3-829
green/runner.py            73     73     0%   3-174
green/suite.py            126    126     0%   1-231
green/version.py            0      0   100%
-----------------------------------------------------
TOTAL                    1444   1444     0%

Ran 233 tests in 2.204s using 4 processes

OK (passes=231, skips=2)

I suspect that the issue might be related to coveralls as the python-coveralls project is no longer being maintained and has never added support for coverage v7.

The output above from coverage says 0%, so it happens before coveralls is involved (we just submit the coverage info to coveralls).

I suspect that part of the issue is that coveralls claims to be incompatible with coverage 7+, and it forces the tests to run with coverage 6.5.0. I have not been able to reproduce locally, albeit with limited testing, but I'll investigate further when I get some free cycles.