Skip to content

examplesg

examplesg #39

Workflow file for this run

# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [main, master, develop]
pull_request:
branches: [main, master, develop]
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y pandoc libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev
#- uses: r-lib/actions/setup-pandoc@v1
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Cache R packages
uses: actions/cache@v1
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
- name: Install R dependencies
run: |
install.packages("remotes", repos="https://cloud.r-project.org")
remotes::install_deps(".", dep=T, upgrade=T)
remotes::install_cran(c("pkgdown","covr","rcmdcheck"))
shell: Rscript {0}
- name: Check
env:
_R_CHECK_FORCE_SUGGESTS_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check")
shell: Rscript {0}
- name: Webpage deployment
if: success() && contains('refs/heads/main', github.ref)
run: |
Rscript -e 'remotes::install_github("kkholst/targeted")'
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
- name: Code Coverage
if: success() && contains('refs/heads/main', github.ref)
run: covr::codecov(type=c("tests", "examples"))
shell: Rscript {0}