Round 5 Submission from MODUS_Covid-Episim #299
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: Validations (R) | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: main | |
paths: | |
- 'data-processed/**' | |
jobs: | |
validate-submission: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
install-r: false | |
use-public-rspm: true | |
- name: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev libv8-dev libharfbuzz-dev libfribidi-dev | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Run validations | |
env: | |
PR_NUMBER: ${{ github.event.number }} | |
run: | | |
if (nchar(Sys.getenv("PR_NUMBER")) > 0) { | |
v <- HubValidations::validate_pr( | |
gh_repo = Sys.getenv("GITHUB_REPOSITORY"), | |
pr_number = Sys.getenv("PR_NUMBER"), | |
data_folder = "data-processed", | |
metadata_folder = "model-metadata", | |
abstract_folder = "model-abstracts" | |
) | |
} else { | |
v <- HubValidations::validate_repository() | |
} | |
HubValidations::check_for_errors(v) | |
shell: Rscript {0} |