(Active) Update hospitilization truth data weekly #180
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: (Active) Update hospitilization truth data weekly | |
on: | |
workflow_dispatch: | |
inputs: | |
skip_zoltar_upload: | |
description: 'true/false indicating whether to skip Zoltar upload' | |
required: false | |
default: 'false' | |
schedule: | |
- cron: '0 16 * * 0' | |
jobs: | |
upload_zoltar: | |
if: github.repository_owner == 'reichlab' | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [10.2] | |
steps: | |
# - run: sudo apt-get remove ghc-** azure-cli firefox google-cloud-sdk google-chrome-stable hhvm dotnet-sdk-** dotnet-runtime-** moby-** adoptopenjdk-** mongodb-org-** mysql-** | |
# - run: sudo apt-get autoremove | |
- name: Free disk space | |
run: | | |
df --human-readable | |
sudo apt clean | |
docker rmi $(docker image ls --all --quiet) | |
rm --recursive --force "$AGENT_TOOLSDIRECTORY" | |
- name: Maximize build space | |
uses: easimon/maximize-build-space@v4 | |
with: | |
root-reserve-mb: 4096 | |
swap-size-mb: 4096 | |
remove-dotnet: 'true' | |
remove-android: 'true' | |
remove-haskell: 'true' | |
- name: Check space available | |
run: df --human-readable | |
- name: Checkout covid19-forecast-hub repo | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
path: covid19-forecast-hub | |
- name: Checkout LFS objects | |
run: git lfs checkout | |
working-directory: ./covid19-forecast-hub | |
- name: Setup GitHub Action for R language | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
use-public-rspm: true | |
- name: Install system dependencies | |
run: sudo apt-get install libudunits2-dev libcurl4-openssl-dev libgdal-dev | |
- name: Checkout covidData | |
uses: actions/checkout@v3 | |
with: | |
repository: reichlab/covidData | |
token: ${{secrets.GH_TOKEN}} | |
path: covidData | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.x' # Version range or exact version of a Python version to use, using SemVer's version range syntax | |
architecture: 'x64' # optional x64 or x86. Defaults to x64 if not specified | |
- name: Install python dependencies | |
run: pip3 install -r visualization/requirements.txt | |
working-directory: ./covid19-forecast-hub | |
- name: Install R dependencies (for covidData + covidHubUtils) | |
working-directory: ./covid19-forecast-hub | |
run: Rscript code/R_scripts/install_dependencies.R | |
env: | |
GITHUB_PAT: ${{ secrets.GH_TOKEN }} | |
- run: mkdir ./covidData/data-raw/JHU/ | |
- name: Install covidData | |
run: make recent_data | |
working-directory: ./covidData/code/data-processing | |
- name: Generate truth csv files (Hospitalization) | |
run: Rscript ./covid19-forecast-hub/code/R_scripts/generate_truth_csvs.R | |
- name: Push generated files to GitHub | |
run: bash ./travis/push-gh.sh | |
working-directory: ./covid19-forecast-hub | |
env: | |
GH_TOKEN: ${{secrets.GH_TOKEN}} | |
- name: Check space available after update | |
run: df --human-readable |