← index #7455PR #18998
Related · medium · value 2.153
QUERY · ISSUE

Set threshold for Coveralls failure

openby dlechopened 2021-06-24updated 2025-11-06
proposed-close

Since MicroPython coverage tests have non-deterministic behavior, many lines of code are executed a different number of times in each CI run. Coveralls takes this number into account when calculating the coverage, so often we get "failures" due to variance between runs even though nothing actually changed. Coveralls provides a threshold setting for what constitutes failure. This could be set (or increased if it is already set) to reduce the number of nuisance "failures".

image

CANDIDATE · PULL REQUEST

github: Avoid unnecessary failures when Actions run in forks

openby projectgusopened 2026-03-25updated 2026-03-26
github_actions

Summary

It came up in passing recently that if you enable Actions on your fork of MicroPython then it consistently fails the Coverage Upload step (unless you set a coverage token in your fork).

This means you get a failure email each time you push to your own repo, which sucks.

@andrewleech submitted a fix for this in #18861 but it ended up being pulled out.

  • This PR submits a new version of andrew's fix that should work as intended.
  • I also worked around a less universal problem: if your fork doesn't have recent tags pushed to it, the mpremote build will fail as it can't pull a version via the 'vcs' method.

Testing

  • I opened a PR in my own fork: https://github.com/projectgus/micropython/pull/15 and verified it passes. Specifically:
    • Coverage upload is skipped: https://github.com/projectgus/micropython/actions/runs/23528973135/job/68488378125
    • Mpremote build is skipped: https://github.com/projectgus/micropython/actions/runs/23528973147/job/68488377983
  • Will check that these jobs run normally in this PR against the upstream repo.

Trade-offs and Alternatives

  • We could drop the mpremote fix as this failure mode is pretty niche (you have to have created your fork before 2023 to hit this case, so I'm not sure how many "bad" forks are out there). However the error when this fails is pretty vague, it took me a while to figure out it was because of the missing tags. So I think it's a nice "quality of life" helper for anyone who has a long-running personal fork of MicroPython.

Generative AI

I did not use generative AI tools when creating this PR.

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied