Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

codecov needs configuration #28

Open
MaKaNu opened this issue Dec 3, 2024 · 0 comments
Open

codecov needs configuration #28

MaKaNu opened this issue Dec 3, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@MaKaNu
Copy link
Contributor

MaKaNu commented Dec 3, 2024

Describe the bug

codecov does not get uploaded, if I follow the documentation.

But it is not recognized as an error in the pipeline.

To Reproduce

Steps to reproduce the behavior:

  1. create a new project from template.
  2. follow the instruction for codecov
  3. inspect action.

result:

Run codecov/codecov-action@v4
eventName: push
==> linux OS detected
https://cli.codecov.io/latest/linux/codecov.SHA256SUM
gpg: directory '/home/runner/.gnupg' created
gpg: keybox '/home/runner/.gnupg/pubring.kbx' created
gpg: /home/runner/.gnupg/trustdb.gpg: trustdb created
gpg: key 806BB28AED779869: public key "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" imported
gpg: Total number processed: 1
gpg:               imported: 1
gpg: Signature made Fri Nov 15 18:59:14 2024 UTC
gpg:                using RSA key 27034E7FDB850E0BBC2C62FF806BB28AED779869
gpg: Good signature from "Codecov Uploader (Codecov Uploader Verification Key) <[email protected]>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg:          There is no indication that the signature belongs to the owner.
Primary key fingerprint: 2703 4E7F DB85 0E0B BC2C  62FF 806B B28A ED77 9869
==> Uploader SHASUM verified (53bf132251eacd7d338b34b69a7b3d0e2d71f95c9de97f0380b6045fc3673e36  codecov)
==> Running version latest
Could not pull latest version information: SyntaxError: Unexpected token '<', "<!DOCTYPE "... is not valid JSON
==> Running git config --global --add safe.directory /home/runner/work/semver-check/semver-check
/usr/bin/git config --global --add safe.directory /home/runner/work/semver-check/semver-check
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-commit --git-service github
info - 2024-12-02 17:38:53,377 -- ci service found: github-actions
info - 2024-12-02 17:38:53,687 -- Process Commit creating complete
error - 2024-12-02 17:38:53,688 -- Commit creating failed: {"message":"Token required because branch is protected"}
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov create-report --git-service github
info - 2024-12-02 17:38:54,404 -- ci service found: github-actions
info - 2024-12-02 17:38:54,755 -- Process Report creating complete
error - 2024-12-02 17:38:54,755 -- Report creating failed: {"message":"Token required because branch is protected"}
==> Running command '/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov do-upload'
/home/runner/work/_actions/codecov/codecov-action/v4/dist/codecov do-upload --git-service github
info - 2024-12-02 17:38:55,468 -- ci service found: github-actions
warning - 2024-12-02 17:38:55,478 -- xcrun is not installed or can't be found.
warning - 2024-12-02 17:38:55,619 -- No gcov data found.
warning - 2024-12-02 17:38:55,619 -- coverage.py is not installed or can't be found.
info - 2024-12-02 17:38:55,641 -- Found 1 coverage files to report
info - 2024-12-02 17:38:55,641 -- > /home/runner/work/semver-check/semver-check/coverage.xml
info - 2024-12-02 17:38:55,965 -- Process Upload complete
error - 2024-12-02 17:38:55,965 -- Upload failed: {"message":"Token required because branch is protected"}

Expected behavior

The documentation should explain how to handle secrets for codecov as well, like PyPi explanation.

If I add

with:
          token: ${{ secrets.CODECOV_TOKEN }}

to the codecov-action it works like intended.

Additional context

I have started to migrate your project to gitlab with gitlab-ci and also had there the same issue. The Documentation is not fully completed, but you might want to take a look how I solved the doc issue: https://gitlab-uv-templates.gitlab.io/cookiecutter-uv-gitlab/features/codecov/

@MaKaNu MaKaNu added the bug Something isn't working label Dec 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants