As covid hub forecasts function #200
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: R-CMD-check | |
on: pull_request | |
jobs: | |
R-CMD-check: | |
runs-on: macOS-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- name: Cache R packages | |
uses: actions/cache@v1 | |
with: | |
path: ${{ env.R_LIBS_USER }} | |
key: r-${{ hashFiles('DESCRIPTION') }} | |
- name: Install dependencies | |
run: | | |
install.packages(c("remotes","devtools","rmarkdown","tidyverse","DT","here","RSocrata")) | |
devtools::install_github("epiforecasts/scoringutils") | |
remotes::install_deps(dependencies = NA) | |
shell: Rscript {0} | |
- name: Install zoltr | |
run: | | |
devtools::install_github("reichlab/zoltr") | |
devtools::install() | |
shell: Rscript {0} | |
- name: Checkout covidData | |
uses: actions/checkout@v3 | |
with: | |
repository: reichlab/covidData | |
path: covidData | |
- name: Install covidData | |
run: make recent_data | |
working-directory: ./covidData/code/data-processing | |
- name: Check | |
run: | | |
devtools::check(args = c("--no-tests", "--no-manual", "--no-vignettes"),error_on = "error") | |
shell: Rscript {0} | |
- name: Upload check results | |
if: failure() | |
uses: actions/upload-artifact@main | |
with: | |
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | |
path: check |