-
Notifications
You must be signed in to change notification settings - Fork 6
41 lines (41 loc) · 1.32 KB
/
model-output.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: model-output-all
run-name: Deploy to ${{ inputs.deploy_target }} by @${{ github.actor }}
on:
push:
branches: ['main']
paths: ['model-output/**', '!**README**']
# pull_request:
# branches: ['main']
# paths: ['model-output/**']
workflow_dispatch:
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: Update R
run: |
sudo apt-get update
- uses: r-lib/actions/setup-r-dependencies@v2
with:
packages: Infectious-Disease-Modeling-Hubs/hubValidations, any::sessioninfo
- name: Run validations
env:
PR_NUMBER: ${{ github.event.number }}
run: |
library("hubValidations")
# Get all filepaths for submissions and sort by date
details = file.info(list.files(
path="./model-output", pattern="*-*-*.csv", recursive=TRUE
))
details = details[with(details, order(as.POSIXct(mtime))), ]
# Get filenames and iterate through them
cFiles = rownames(details)
sapply(cFiles, hubValidations::validate_submission, hub_path='.')
shell: Rscript {0}