Skip to content

CI: keep per-matrix coverage artifacts and fail Codecov errors (#1088) - #1123

Open
thatrandomasiandev wants to merge 2 commits into
RocketPy-Team:developfrom
thatrandomasiandev:ci/1088-coverage-matrix-artifacts
Open

CI: keep per-matrix coverage artifacts and fail Codecov errors (#1088)#1123
thatrandomasiandev wants to merge 2 commits into
RocketPy-Team:developfrom
thatrandomasiandev:ci/1088-coverage-matrix-artifacts

Conversation

@thatrandomasiandev

Copy link
Copy Markdown

Summary

  • Give each pytest matrix leg a unique coverage artifact (coverage-${{ matrix.os }}-py${{ matrix.python-version }}) instead of overwriting a shared coverage name.
  • Rename each coverage.xml before upload so download-artifact merge-multiple: true can flatten all reports without clobbering identical basenames.
  • Download all coverage-* artifacts in CodecovUpload and upload the full set via Codecov's directory input.
  • Set fail_ci_if_error: true so Codecov upload failures fail CI.

Fixes #1088

Test plan

  • Confirm CI runs on this PR (workflow paths include .github/**)
  • Each of the 6 matrix legs uploads a distinct coverage-*-py* artifact
  • CodecovUpload downloads all six and uploads without silent overwrite
  • A simulated Codecov error would fail the job (fail_ci_if_error: true)

@Gui-FernandesBR
Gui-FernandesBR force-pushed the ci/1088-coverage-matrix-artifacts branch from 146679f to 0e6eb73 Compare August 12, 2026 02:42
@codecov

codecov Bot commented Aug 12, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.94%. Comparing base (e0ff281) to head (59851ee).
⚠️ Report is 49 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1123      +/-   ##
===========================================
+ Coverage    82.18%   82.94%   +0.76%     
===========================================
  Files          122      129       +7     
  Lines        16355    16901     +546     
===========================================
+ Hits         13441    14019     +578     
+ Misses        2914     2882      -32     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

thatrandomasiandev and others added 2 commits August 12, 2026 19:30
)

The artifact renaming was the right diagnosis, but review turned up eight
follow-ups:

- fail_ci_if_error was unconditional, and forks get no secrets, so an
  external contributor would see red whenever the tokenless upload got
  rate limited. Tie it to the token, as RocketPy-Team#1088 prescribed.
- overwrite: true was dropped. Artifacts are keyed by (run, name) and
  survive across attempts, so every leg of a re-run failed with 409
  Conflict. The flaky VTK tests make re-runs routine.
- needs: Pytest with no if: guard skipped CodecovUpload entirely when a
  single leg failed, sending Codecov nothing at all for the commit while
  .codecov.yml resolves that as an error. Run on !cancelled() and upload
  whatever legs did finish.
- download-artifact exits 0 when pattern matches fewer artifacts than
  expected, so five of six reports looked like a clean run. Verify the
  count against the matrix size and refuse the silently-partial case.
- Both .codecov.yml statuses were scoped to a `unit` flag that no upload
  has ever tagged, so the gate resolved over an empty flag set and
  measured nothing. The reports are unit + doctest + integration +
  acceptance combined, so drop the flag rather than mislabel them.
- --cov-report=xml:<name> writes the per-leg filename directly, so the
  extra mv step goes away and if-no-files-found: error is reachable again
  instead of being masked by the mv failing first.
- retention-days: 1, since artifacts per run went from 1 to 6 and
  CodecovUpload consumes them minutes later.
- env: OS/PYTHON and .github/workflows/upload-to-codecov.yml were dead.
  The reusable workflow was called by nothing and was the only consumer
  of those two variables, while holding a second, diverging copy of the
  Codecov settings.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@Gui-FernandesBR
Gui-FernandesBR force-pushed the ci/1088-coverage-matrix-artifacts branch from 2132b68 to 59851ee Compare August 12, 2026 22:30
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.

Coverage: five of six matrix reports are discarded, and the upload cannot fail the job

2 participants