Skip to content

Commit

Permalink
add code coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Jan 15, 2025
1 parent de969dd commit 16ab3d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:

env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
R_KEEP_PKG_SOURCE: yes
_R_CHECK_FORCE_SUGGESTS_: false
_R_CHECK_RD_XREFS_: false
Expand Down Expand Up @@ -72,6 +73,13 @@ jobs:
R CMD build litedown
R CMD check --as-cran --no-manual litedown_*.tar.gz
- name: Test coverage
if: success() && runner.os == 'Linux' && matrix.config.r == 'release'
run: |
pak::pkg_install('covr')
covr::codecov()
shell: Rscript {0}

- uses: actions/checkout@HEAD
if: runner.os == 'macOS'
with:
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
release](https://www.r-pkg.org/badges/version/litedown)](https://cran.r-project.org/package=litedown)
[![litedown on
r-universe](https://yihui.r-universe.dev/badges/litedown)](https://yihui.r-universe.dev/litedown)
[![Codecov test
coverage](https://codecov.io/gh/yihui/litedown/branch/main/graph/badge.svg)](https://app.codecov.io/gh/yihui/litedown?branch=main)

<!-- badges: end -->

Expand Down

0 comments on commit 16ab3d8

Please sign in to comment.