Skip to content

Commit

Permalink
add coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreas Blätte authored and Andreas Blätte committed Jul 1, 2023
1 parent b42ffc1 commit a9d7a69
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
@@ -1,3 +1,4 @@
^README.Rmd$
^README.md$
^\.github$
^codecov\.yml$
24 changes: 24 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Expand Up @@ -29,3 +29,27 @@ jobs:
needs: check

- uses: r-lib/actions/check-r-package@v2

- name: Test coverage
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}

- name: Show testthat output
if: always()
run: |
## --------------------------------------------------------------------
find ${{ runner.temp }}/package -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload test results
if: failure()
uses: actions/upload-artifact@v3
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package

1 change: 1 addition & 0 deletions README.Rmd
Expand Up @@ -9,6 +9,7 @@ editor_options:
[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-green.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![R-CMD-check](https://github.com/PolMine/duplicates/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/PolMine/duplicates/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/PolMine/duplicates/branch/devel/graph/badge.svg)](https://app.codecov.io/gh/PolMine/duplicates?branch=devel)
<!-- badges: end -->


Expand Down
2 changes: 2 additions & 0 deletions README.md
Expand Up @@ -8,6 +8,8 @@ v3](https://img.shields.io/badge/License-GPLv3-green.svg)](https://www.gnu.org/l
[![Lifecycle:
experimental](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing)
[![R-CMD-check](https://github.com/PolMine/duplicates/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/PolMine/duplicates/actions/workflows/R-CMD-check.yaml)
[![Codecov test
coverage](https://codecov.io/gh/PolMine/duplicates/branch/devel/graph/badge.svg)](https://app.codecov.io/gh/PolMine/duplicates?branch=devel)
<!-- badges: end -->

## About
Expand Down
14 changes: 14 additions & 0 deletions codecov.yml
@@ -0,0 +1,14 @@
comment: false

coverage:
status:
project:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true

0 comments on commit a9d7a69

Please sign in to comment.