Skip to content

Commit

Permalink
add codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Jan 8, 2023
1 parent 2b63c6a commit 7759f85
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 1 deletion.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
^.*\.Rproj$
^\.Rproj\.user$
^.lintr$
^codecov\.yml$
31 changes: 31 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 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@v3

- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true

- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::covr
needs: coverage

- name: Test coverage
run: covr::codecov(quiet = FALSE)
shell: Rscript {0}
6 changes: 5 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ BugReports: https://github.com/JanMarvin/readsas/issues
Depends: R (>= 3.4.0)
Imports: Rcpp, stringi
LinkingTo: Rcpp
Suggests: testthat, foreign, datasets
Suggests:
testthat,
foreign,
datasets,
covr
Encoding: UTF-8
Language: en-US
RoxygenNote: 7.2.3
Expand Down
1 change: 1 addition & 0 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ library(readsas)
# readsas
<!-- badges: start -->
![R-CMD-check](https://github.com/JanMarvin/readspss/workflows/R-CMD-check/badge.svg)
[![Codecov test coverage](https://codecov.io/gh/JanMarvin/readsas/branch/main/graph/badge.svg)](https://app.codecov.io/gh/JanMarvin/readsas?branch=main)
<!-- badges: end -->

R package using Rcpp to parse a SAS file into a data.frame(). Currently
Expand Down
9 changes: 9 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
codecov:
token: 6ada052e-d99a-4f68-af1f-813f426e00ad

comment: no # do not comment PR with the result

coverage:
status:
project: false
patch: false

0 comments on commit 7759f85

Please sign in to comment.