Skip to content

Commit

Permalink
🧪🚑 Pass a Codecov config to the action @ GHA (#12508) (#12513)
Browse files Browse the repository at this point in the history
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.

Co-authored-by: Ronny Pfannschmidt <opensource@ronnypfannschmidt.de>
(cherry picked from commit 9947ec3)

Co-authored-by: Sviatoslav Sydorenko (Святослав Сидоренко) <wk@sydorenko.org.ua>
  • Loading branch information
patchback[bot] and webknjaz authored Jun 21, 2024
1 parent a22b8e1 commit d3dacc7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,8 @@ jobs:
- name: Upload coverage to Codecov
if: "matrix.use_coverage"
uses: codecov/codecov-action@v4
continue-on-error: true
with:
fail_ci_if_error: true
fail_ci_if_error: false
files: ./coverage.xml
verbose: true

Expand Down
5 changes: 5 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
# reference: https://docs.codecov.io/docs/codecovyml-reference
---

codecov:
token: 1eca3b1f-31a2-4fb8-a8c3-138b441b50a7 #repo token

coverage:
status:
patch: true
Expand Down

0 comments on commit d3dacc7

Please sign in to comment.