Skip to content

Commit

Permalink
gh action updates
Browse files Browse the repository at this point in the history
  • Loading branch information
smwoodman committed Sep 5, 2023
1 parent 1a20097 commit 20e108b
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions .github/workflows/data-to-dwc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,27 +10,32 @@ jobs:
generate-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 # Checkout branch into the runner
- uses: r-lib/actions/setup-r@master # Set up R runtime
- uses: actions/checkout@v3
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'

- name: Setup renv # Set up R env to install packages
run: |
install.packages('remotes')
remotes::install_github("rstudio/renv")
shell: Rscript {0}
r-version: 'renv'
- uses: r-lib/actions/setup-renv@v2

- uses: actions/cache@v2 # Cache packages so won't be compiled everytime job is run
- uses: actions/cache@v3 # Cache packages so won't be compiled everytime job is run
with:
path: ~/.local/share/renv
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Install dependencies # Install the dependencies eg. Dplyr, tidyverse etc
run: renv::restore()
- name: Cache packages
uses: actions/cache@v3
with:
path: ~/.local/share/renv
key: ${{ runner.os }}-renv-${{ hashFiles('**/renv.lock') }}
restore-keys: |
${{ runner.os }}-renv-
- name: Restore packages
shell: Rscript {0}
run: |
if (!requireNamespace("renv", quietly = TRUE)) install.packages("renv")
renv::restore()
- name: Generate data # Run the script
run: source("R/data_to_dwc.R")
Expand Down

0 comments on commit 20e108b

Please sign in to comment.