jkurle
February 15, 2022, 8:23am
1
Hello,
I would like to add code coverage to my R package with automated updating of the coverage using GitHub Actions. I saw that there is a template, which I have now used: usethis::use_github_action("test-coverage")
.
However, there is also an example workflow yaml file on codecov itself that seems simpler: link Will they achieve the same?
Best,
Jonas
Gabor
February 16, 2022, 9:40am
2
No, they are not the same. For R packages use the one here:
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
name: test-coverage
jobs:
test-coverage:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
This file has been truncated. show original
The next (current dev) version of usethis will use the same file, and once that is released, usethis will be the best way of adding these workflows.
1 Like
system
Closed
February 23, 2022, 9:43am
4
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.