When trying to run the r-lib/actions/setup-r for R in Github Actions installing the dependencies.
syntax error near unexpected token `c'
The pipeline yaml file
name: R
on:
push:
branches: [ main, feature/* ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: macOS-latest
steps:
- uses: actions/checkout@master
- uses: r-lib/actions/setup-r@v1
with:
r-version: '3.5.3' # The R version to download (if necessary) and use.
- name: Install dependencies
run: |
install.packages(c("gmodels", "class"))
remotes::install_deps(dependencies = TRUE)
I was missing adding shell: Rscript {0} at the end so the Install dependencies will be
- name: Install dependencies
run: |
install.packages(c("gmodels", "class"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}
Source: https://github.com/r-lib/actions/tree/master/examples