Skip to content

Fix coverage CI job - #30

Closed
ewjoachim wants to merge 1 commit into
bbc:mainfrom
ewjoachim:fix-coverage
Closed

ewjoachim wants to merge 1 commit into
bbc:mainfrom
ewjoachim:fix-coverage

Conversation

@ewjoachim

Copy link
Copy Markdown

Coverage fails because of implicit merge. Explicit merge won't work because one of the file detected as a coverage file is a license file.

Also, there's a committed .coverage file, it should not be committed.

The easiest way to get things working for now is to remove all .coverage* files before running.

This is likely not the cleanest fix, though.

Root cause: coveragepy/coveragepy#2197
Linked to: py-cov-action/python-coverage-comment-action#676

@nigelmegitt nigelmegitt left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for looking into this @ewjoachim and for raising the associated tickets upstream, very much appreciated.

As you pointed out if .coverage and .coverage.license were not in the repository this problem would be sidestepped and this pull request would not actually be needed. That's probably the better solution, in fact.

You may have noticed that our DCO check failed on this PR (see CONTRIBUTING.md) - I'd love to credit you with this but pragmatically I think the best way forward is if I mention you in a commit to remove .coverage.

Let me know if that works for you. If so, you can close this PR without merging.

@github-actions

Copy link
Copy Markdown

Coverage report

This PR does not seem to contain any modification to coverable code.

@nigelmegitt

Copy link
Copy Markdown
Collaborator

I approved the workflow run to see if it would indeed work, and it succeeded, verifying that removing the .coverage* files in the repo works around the problem.

@nigelmegitt

Copy link
Copy Markdown
Collaborator

You may have noticed that our DCO check failed on this PR (see CONTRIBUTING.md) - I'd love to credit you with this but pragmatically I think the best way forward is if I mention you in a commit to remove .coverage.

Of course another (great) option would be if you could sign and sign-off your commits and force push them, which should work. A command line for doing this is:

git rebase --signoff HEAD~1

followed by the force push.

@ewjoachim

ewjoachim commented Jun 19, 2026 •

Copy link
Copy Markdown
Author

I'm very ok with a mention in the commit, or even with nothing. It was a fun investigation and it made visible a number of improvements needed in the action that will contribute to its quality (improve the error message: it's almost never a permission issue. Improve json parsing to display a proper error when it fails. Always display stderr in debug even when returncode isn't 0, etc)

@ewjoachim ewjoachim closed this Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants