Set up a GitHub Actions workflow to run on some example tests #7
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |