Skip to content

Add codecov token in test coverage#823

Merged
gaborcsardi merged 4 commits intor-lib:v2-branchfrom
ALanguillaume:add-codecov-token-in-test-coverage
Apr 11, 2024
Merged

Add codecov token in test coverage#823
gaborcsardi merged 4 commits intor-lib:v2-branchfrom
ALanguillaume:add-codecov-token-in-test-coverage

Conversation

@ALanguillaume
Copy link
Copy Markdown
Contributor

Related to #822

  • To be able to upload the code coverage result to codecov.io users must now provide a CODECOV_TOKEN to authenticate to the service. This token must be defined as a repository secret.

  • GITHUB_PAT is no longer required for the workflow to work

  • Explicitly pass CODECOV_TOKEN as covr::codecov() parameter to highlight its purpose

- To be able to upload the code coverage result to codecov.io users must now provide a CODECOV_TOKEN to authenticate to the service.
- This token must be defined as a repository secret.
- GITHUB_PAT is no longer required for the workflow to work
- Make the intent of the token explicit.
- That way readers can clearly see that CODECOV_TOKEN in a requirement for `covr::codecov()`.
Copy link
Copy Markdown
Member

@gaborcsardi gaborcsardi left a comment

Choose a reason for hiding this comment

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

Thanks! Requested some changes.

Some packages need that to install dependencies from github for example
@gaborcsardi
Copy link
Copy Markdown
Member

Thanks! The thing is, if we want to keep the current behavior when the secret is not available, then we'll need to do a bit more work. :( It is not (easily) possible to conditionally set an env var in a GHA workflow, so we'll do this from the R code. I don't love this, but I think we need this to keep current repos working.

In any case I can do that later, after this is merged.

@gaborcsardi gaborcsardi merged commit a6aeac2 into r-lib:v2-branch Apr 11, 2024
@github-actions
Copy link
Copy Markdown

This pull request has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this pull request.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants