Skip to content

Commit

Permalink
Add gh-codecov-action
Browse files Browse the repository at this point in the history
Update Readme
  • Loading branch information
abuseki committed Feb 4, 2024
1 parent bc70dc2 commit 413fd33
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 2 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 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@v4

- 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,
clean = FALSE,
install_path = file.path(normalizePath(Sys.getenv("RUNNER_TEMP"), winslash = "/"), "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@v4
with:
name: coverage-test-failures
path: ${{ runner.temp }}/package
10 changes: 9 additions & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ knitr::opts_chunk$set(echo = TRUE, message = FALSE)
<!-- badges: start -->
[![R-CMD-check](https://github.com/abuseki/georefdatar/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/abuseki/georefdatar/actions/workflows/R-CMD-check.yaml)
[![CRAN status](https://www.r-pkg.org/badges/version/georefdatar)](https://CRAN.R-project.org/package=georefdatar)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://choosealicense.com/licenses/mit/)
[![Test coverage](https://github.com/abuseki/georefdatar/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/abuseki/georefdatar/actions/workflows/test-coverage.yaml)
<!-- badges: end -->

The goal of georefdatar is to provide regularly used reference data sets for
Expand All @@ -33,7 +35,13 @@ All datasets are fully referenced, and a BibTeX file containing the references i

## Installation

You can install the development version of georefdatar from [GitHub](https://github.com/) with:
You can install the version from [CRAN](https://cran.r-project.org/) with:

``` r
install.packages("georefdatar")
```

Or you can install the development version from [GitHub](https://github.com/) with:

``` r
# install.packages("devtools")
Expand Down
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
[![R-CMD-check](https://github.com/abuseki/georefdatar/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/abuseki/georefdatar/actions/workflows/R-CMD-check.yaml)
[![CRAN
status](https://www.r-pkg.org/badges/version/georefdatar)](https://CRAN.R-project.org/package=georefdatar)
[![License:
MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://choosealicense.com/licenses/mit/)
[![Test
coverage](https://github.com/abuseki/georefdatar/actions/workflows/test-coverage.yaml/badge.svg)](https://github.com/abuseki/georefdatar/actions/workflows/test-coverage.yaml)
<!-- badges: end -->

The goal of georefdatar is to provide regularly used reference data sets
Expand Down Expand Up @@ -33,7 +37,14 @@ references is included.

## Installation

You can install the development version of georefdatar from
You can install the version from [CRAN](https://cran.r-project.org/)
with:

``` r
install.packages("georefdatar")
```

Or you can install the development version from
[GitHub](https://github.com/) with:

``` r
Expand Down

0 comments on commit 413fd33

Please sign in to comment.