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

ci: add CODECOV_TOKEN field to upload coverage #641

Merged
merged 2 commits into from
Jul 1, 2024

Conversation

ashnamehrotra
Copy link
Contributor

Describe the changes in this pull request using active verbs such as Add, Remove, Replace ...

Closes #<issue_ID>

Signed-off-by: ashnamehrotra <ashnamehrotra@gmail.com>
@ashnamehrotra ashnamehrotra marked this pull request as draft May 29, 2024 21:02
Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 34.20%. Comparing base (2602d59) to head (5136b34).
Report is 94 commits behind head on main.

Current head 5136b34 differs from pull request most recent head d1a2593

Please upload reports for the commit d1a2593 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #641      +/-   ##
==========================================
+ Coverage   32.51%   34.20%   +1.69%     
==========================================
  Files          17       18       +1     
  Lines        1621     1523      -98     
==========================================
- Hits          527      521       -6     
+ Misses       1062      969      -93     
- Partials       32       33       +1     

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

@@ -50,6 +50,8 @@ jobs:
run: make test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@125fc84a9a348dbcf27191600683ec096ec9021c # v4.4.1
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can't add this here, as forks do not have access to secrets.

afaik we don't need codecov token for public repositories: https://about.codecov.io/blog/tokenless-uploads-for-github-actions/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it looks like they in the new release of codecov it is unsupported (https://github.com/codecov/codecov-action/releases/tag/v4.0.0), but forks will not need access?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To quote one line of the CodeCov release that Ashna linked:

Tokenless uploading is unsupported. However, PRs made from forks to the upstream public repos will support tokenless (e.g. contributors to OS projects do not need the upstream repo's Codecov token). This doc shows instructions on how to add the Codecov token.

So it looks like this repo can add the CodeCov token and it should be fine that nobody's forks will have access to it.

@ashnamehrotra ashnamehrotra marked this pull request as ready for review June 28, 2024 21:50
@ashnamehrotra
Copy link
Contributor Author

Added CODECOV_TOKEN to repo

Copy link
Member

@sozercan sozercan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ashnamehrotra ashnamehrotra merged commit 8987230 into project-copacetic:main Jul 1, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants