From d34ac8ae5a49c0c8e01772b5be0d876c1f5fa4fc Mon Sep 17 00:00:00 2001 From: deanmarchiori Date: Mon, 15 Apr 2024 10:55:02 +1000 Subject: [PATCH] configuring CI --- .Rbuildignore | 1 + .github/.gitignore | 1 + .github/workflows/R-CMD-check.yaml | 32 ++++++++++++++++++++++++++++++ README.Rmd | 1 + README.md | 2 ++ 5 files changed, 37 insertions(+) create mode 100644 .github/.gitignore create mode 100644 .github/workflows/R-CMD-check.yaml diff --git a/.Rbuildignore b/.Rbuildignore index f9266b7..d30899e 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -2,3 +2,4 @@ ^\.Rproj\.user$ ^README\.Rmd$ ^LICENSE\.md$ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /dev/null +++ b/.github/.gitignore @@ -0,0 +1 @@ +*.html diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..1b5e463 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,32 @@ +# 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: R-CMD-check + +jobs: + R-CMD-check: + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + 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::rcmdcheck + needs: check + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/README.Rmd b/README.Rmd index 9b553d1..cb1ee10 100644 --- a/README.Rmd +++ b/README.Rmd @@ -16,6 +16,7 @@ knitr::opts_chunk$set( # ohcleandat +[![R-CMD-check](https://github.com/ecohealthalliance/ohcleandat/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ecohealthalliance/ohcleandat/actions/workflows/R-CMD-check.yaml) This package provides useful functions to orchestrate analytics and data cleaning pipelines for One Health projects. diff --git a/README.md b/README.md index a373a45..7aac19c 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,8 @@ # ohcleandat + +[![R-CMD-check](https://github.com/ecohealthalliance/ohcleandat/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/ecohealthalliance/ohcleandat/actions/workflows/R-CMD-check.yaml) This package provides useful functions to orchestrate analytics and data