Skip to content

Set up a GitHub Actions workflow to run on some example tests #7

Set up a GitHub Actions workflow to run on some example tests

Set up a GitHub Actions workflow to run on some example tests #7

Workflow file for this run

name: Run R Test
on:
push:
branches:
- main
pull_request:
branches:
- '**'
jobs:
run-r-script:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.3.3' # specify the version of R you need
- name: Install remotes package
run: |
Rscript -e 'install.packages("remotes")'
- name: Install R packages
run: |
Rscript -e 'remotes::install_github("jgcri/hector")' # The Hector package & dependeices
Rscript -e 'install.packages(c("here", "assertthat"))' # Add any packages your script needs
- name: Run R script
run: |
Rscript scripts/ex_test.R