"Test coverage visualization" does not work with simple Python project
Summary
I am trying to get the "Test coverage visualization" work with a simple Python project. Unfortunately, it does not seem to be working. Calculating total coverage percentage works fine though (badge is available).
Steps to reproduce
On example project (see link below):
- comment all the tests in
main.py
, commit - uncomment all the tests in
main.py
, commit - (unexpected) no coverage visualization on commit change (link)
- Same with merge, (unexpected) no coverage visualization on merge change (link)
Example Project
https://gitlab.com/mvfwd/gitlab-coverage
What is the current bug behavior?
I don't see anything that looks like code coverage on commit (or merge) change.
What is the expected correct behavior?
I expect to see green/red labels on every modified line of the change showing if this line was covered by tests.
Additionally (not sure if that's possible) I'd like to see line-by-line coverage on every file in project repo.
Relevant logs and/or screenshots
- Change screenshot without coverage: https://gitlab.com/mvfwd/gitlab-coverage/-/raw/master/screenshot.png
- Job logs: https://gitlab.com/mvfwd/gitlab-coverage/-/jobs/1450561054
$ coverage run ./main.py
..
----------------------------------------------------------------------
Ran 2 tests in 0.001s
OK
$ coverage report -m
Name Stmts Miss Cover Missing
---------------------------------------
main.py 26 12 54% 9-14, 20-25
---------------------------------------
TOTAL 26 12 54%
$ coverage xml
Uploading artifacts for successful job
00:03
Uploading artifacts...
./coverage.xml: found 1 matching files and directories
Uploading artifacts as "archive" to coordinator... ok id=1450561054 responseStatus=201 Created token=eZqc9KYb
Uploading artifacts...
./coverage.xml: found 1 matching files and directories
Uploading artifacts as "cobertura" to coordinator... ok id=1450561054 responseStatus=201 Created token=eZqc9KYb
Cleaning up file based variables
00:00
Job succeeded
Output of checks
This bug happens on GitLab.com
Results of GitLab environment info
(skipped)
Results of GitLab application Check
(skipped)
Possible fixes
No workaround or fixes found yet.