Description
The SQL query below used to parse .coverage
for Python projects returns 0 results if coverage
was run with --branch
on the CLI or with branch = True
in .coveragerc
.
coverage-reporter/src/coverage_reporter/parsers/coveragepy_parser.cr
Lines 10 to 14 in fd443e4
With this argument/setting, coverage
seems not to add any rows in the line_bits
table, and coverage-reporter
will therefore find that there is "nothing to report" using the above query; only the arc
table is populated with --branch
, and it isn't queried.
Omitting the --branch
argument or removing/commenting out the branch = True
configuration setting lets coverage-reporter
find results in the .coverage
file, with the obvious caveat that only statement coverage data is reported.
Note that without --branch
, the arc
table is now empty, and line_bits
is populated.
I attempted to work around this by running coverage lcov
prior to the coverallsapp/github-action@v2
step, and it appears to work, but doesn't seem ideal. With zero code changes, the project's coverage jumped by 0.6% and spot-checking a few places showed a lot of unexpected branch coverage annotations on Coveralls. For example, partially covered branches I checked are now shown as fully covered, and sometimes branch-coverage annotations appear in the Coveralls UI where there is no branch at all:

I'm unsure yet whether coverage
outputs bad lcov
format when branch tracking is enabled, or if coveralls-reporter
isn't parsing it correctly. At this point I've only managed to figure out that something isn't working as expected. 😅