Skip to content

Commit

Permalink
Merge pull request #147 from cmu-delphi/r-ci
Browse files Browse the repository at this point in the history
Add CI for R package
  • Loading branch information
capnrefsmmat authored Oct 30, 2020
2 parents 08114f9 + 55bb2a6 commit 4ee0fe7
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/r_ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
#
# See https://github.com/r-lib/actions/tree/master/examples#readme for
# additional example workflows available for the R community.

name: R

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: R-packages/covidcast/
strategy:
matrix:
r-version: [3.5]

steps:
- uses: actions/checkout@v2
- name: Set up R ${{ matrix.r-version }}
uses: r-lib/actions/setup-r@ffe45a39586f073cc2e9af79c4ba563b657dc6e3
with:
r-version: ${{ matrix.r-version }}
- name: Install libcurl
run: sudo apt-get install libcurl4-openssl-dev
- name: Cache R packages
uses: actions/cache@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-r-1-
- name: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
- name: Check
run: |
rcmdcheck::rcmdcheck(args = c("--no-manual", "--ignore-vignettes", "--as-cran"), build_args = c("--no-build-vignettes"), error_on = "error")
shell: Rscript {0}

0 comments on commit 4ee0fe7

Please sign in to comment.