pytest-dev / pytest

The pytest framework makes it easy to write small tests, yet scales to support complex functional testing
https://pytest.org
MIT License
11.64k stars 2.59k forks source link

๐Ÿงช๐Ÿš‘ Pass a Codecov config to the action @ GHA #12508

Closed webknjaz closed 2 weeks ago

webknjaz commented 2 weeks ago

The #11921 update broke uploading coverage of the main branch (or any in-repo pushes for that matter) to Codecov 4 months ago. Version 4 requires an upload token to be provided and since there was no configuration for it, the upload was failing. But the step itself was showing up as successful due to fail_ci_if_error: true being set. The error is visible in the console output, though.

This patch flips the setting to fail_ci_if_error: false and sets the Codecov upload token in the config in clear text. The non-secret part allows the PRs uploads to be more stable.

webknjaz commented 2 weeks ago

@RonnyPfannschmidt this probably doesn't need a change note and should be backported.

webknjaz commented 2 weeks ago

@RonnyPfannschmidt this is auto-merge-ready now.

webknjaz commented 2 weeks ago

UPD: it looks like the codecov action isn't picking up the config. Perhaps, it needs renaming.

webknjaz commented 2 weeks ago

Let's try merging. Perhaps, it'll work once the config is in main..

The-Compiler commented 2 weeks ago

Not that comfortable with the token being public, but while Adding the Codecov token doesn't explicitly mention it, the web interface shows that as a possible option:

image

so I suppose we'll be fine.

patchback[bot] commented 2 weeks ago

Backport to 8.2.x: ๐Ÿ’š backport PR created

โœ… Backport PR branch: patchback/backports/8.2.x/9947ec3ad1a0fb9f85b092a50b0866b3870e37ad/pr-12508

Backported as https://github.com/pytest-dev/pytest/pull/12513

๐Ÿค– @patchback I'm built with octomachinery and my source is open โ€” https://github.com/sanitizers/patchback-github-app.