Skip to content

Get coverage badge without uploading test results#3

Merged
stitam merged 9 commits intomainfrom
dev
Mar 3, 2026
Merged

Get coverage badge without uploading test results#3
stitam merged 9 commits intomainfrom
dev

Conversation

@stitam
Copy link
Copy Markdown
Collaborator

@stitam stitam commented Mar 3, 2026

It is good practice to include test coverage in the package README. The approach I was familiar with included a github workflow like this: https://github.com/r-lib/actions/blob/v2-branch/examples/test-coverage.yaml. The workflow is triggered for PRs and my understanding is that the runner calculates test coverage, uploads the coverage report to codecov and then the badge is retrieved from codecov. However, for this to work we need to integrate GitHub with codecov. This is probably fine but I don't think this is necessary.

This PR replaces test-coverage.yaml with update-readme.yaml. The new workflow requests the runner to rebuild the readme. If the readme has changed, the runner will commit it to the PR. If not, the runner posts a message to the PR that the readme is up to date. This way coverage still gets recalculated automatically at each PR. Let's see if it works :)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 3, 2026

Updated repo README file.

@stitam stitam merged commit cdc14a3 into main Mar 3, 2026
@stitam stitam deleted the dev branch March 3, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant