Skip to content

Validate Hub Configuration #15

Validate Hub Configuration

Validate Hub Configuration #15

name: Validate Hub Configuration
on:
workflow_dispatch:
jobs:
validate-hub_config_job:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: checkout data repo
uses: actions/checkout@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
repository: 'Testing-Forecast-Actions/ScenarioModellingHub'
ref: 'main'
path: './repo/'
# TEST ONLY -----------------------------------
- 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 libudunits2-dev libgdal-dev
# install test dep
- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: Infectious-Disease-Modeling-Hubs/hubValidations, any::sessioninfo
# - name: Install remotes
# run: |
# install.packages("remotes")
# shell: Rscript {0}
- name: Install dependencies
run: |
R -e 'remotes::install_github("Infectious-Disease-Modeling-Hubs/hubAdmin", ref = "feature/handle-samples")'
# install.packages(c("arrow", "gh", "remotes"))
# R -e 'Sys.setenv("NOT_CRAN" = TRUE)
# Sys.unsetenv("NOT_CRAN")
# remotes::install_url("https://github.com/midas-network/SMHvalidation/archive/refs/heads/main.zip")
# remotes::install_url("https://github.com/Infectious-Disease-Modeling-Hubs/hubUtils/archive/refs/heads/main.zip")'
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
# validate hub configurations
- name: Run hub config validations
run: |
library("hubValidations")
v <- hubAdmin::validate_hub_config(hub_path = "./repo", branch = "br-v3.0.0", schema_version = "latest")
# v <- hubAdmin::validate_hub_config(hub_path = Sys.getenv("GITHUB_REPOSITORY"), branch = "br-v3.0.0", schema_version = "latest")
# hubValidations::check_for_errors(v, verbose = TRUE)
shell: Rscript {0}
- name: trace
run: echo "Validation completed"