Val test 3 #21
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: Validate Submission(s) | |
on: | |
pull_request_target: | |
branches: | |
- main | |
jobs: | |
validates-files: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
- name: verify change in data-processed folder | |
run: | | |
if [ -n "$( git show --pretty="" --name-only -- data-processed/)" ]; then | |
echo "Commit includes change in the data-processed folder"; | |
else | |
exit 1 | |
fi | |
- name: Setup R | |
uses: r-lib/actions/setup-r@v2 | |
- name: Install system dependencies | |
run: sudo apt-get install libcurl4-openssl-dev libudunits2-dev libgdal-dev | |
- name: Cache R packages | |
id: cache | |
if: runner.os != 'Windows' | |
uses: actions/cache@v2 | |
with: | |
path: ${{ env.R_LIBS_USER }} | |
key: ${{ runner.os }}-${{ hashFiles('.github/requirements.txt') }}-1 | |
- name: Install dependencies | |
if: steps.cache.outputs.cache-hit != 'true' | |
run: | | |
R -e 'Sys.setenv("NOT_CRAN" = TRUE) | |
install.packages(c("arrow", "gh", "remotes")) | |
Sys.unsetenv("NOT_CRAN") | |
remotes::install_url("https://github.com/midas-network/SMHvalidation/archive/refs/heads/version.zip") | |
remotes::install_url("https://github.com/Infectious-Disease-Modeling-Hubs/hubUtils/archive/refs/heads/main.zip")' | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run Validation | |
run: | | |
Rscript code/validation.R | |
env: | |
GH_PR_NUMBER: ${{ github.event.pull_request.number }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |