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 6524c24 commit 41a7fc4
Show file tree
Hide file tree
Showing 6 changed files with 50 additions and 2 deletions.
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
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@
<!-- 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
`read.sas` is the main function and feature of this package.

The package allows (experimental) reading of sas7bdat files that are

- (un)compressed
- (un)compressed

As with other releases of the `read` series, focus is again on being as
accurate as possible. Speed is welcome, but a secondary goal.
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 41a7fc4

Please sign in to comment.