Commit c15632a
committed
Coverage that cannot report a green it did not earn
Two parts of the coverage path report success while doing nothing. Both are in
the logs of any recent run.
The six matrix legs all uploaded an artifact named `coverage` with
`overwrite: true`, which deletes the previous artifact rather than merging into
it. Run 30461091931 shows `Artifact 'coverage' (ID: 8727950028) deleted` and
then finalized again by a later leg, so five of the six reports were thrown away
and the surviving one was whichever leg happened to finish last. Each leg now
writes and uploads a report named after itself, and the upload job downloads all
of them.
The headline number was not far off, since all six legs land on 80%, but which
platform's report reached Codecov was decided by a race, and code that only runs
on one platform was counted or not depending on it.
`files:` was a YAML block literal, so the name arrived as "coverage.xml\n" and
was not found. The upload only worked because the uploader falls back to
searching. That fallback is now unnecessary: the reports are in one directory,
and the directory is what is passed.
`fail_ci_if_error` is tied to whether a token was there to use. A pull request
from a fork gets no secrets, and a contributor should not see red for that.
What this does not fix: `CODECOV_TOKEN` resolves to empty on this repository, so
the upload is still rejected with "Token required - not valid tokenless upload",
and with no token the run stays green. Setting that secret is the last step and
it needs repository admin. Once it is set, this workflow fails when an upload
fails, without another change.
Upstream RocketPy carries both of these unchanged. Happy to send the same patch
there so it comes back through the usual sync.
Verified: actionlint clean, `--cov-report=xml:<name>` writes the named file, and
`pattern` / `merge-multiple` / `directory` / `fail_ci_if_error` all exist as
inputs on the pinned actions.
Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>1 parent 6ec4a2c commit c15632a
1 file changed
Lines changed: 22 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
72 | 74 | | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
78 | 80 | | |
79 | | - | |
| 81 | + | |
80 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
81 | 91 | | |
82 | 92 | | |
83 | 93 | | |
84 | 94 | | |
85 | | - | |
86 | | - | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
0 commit comments