Score forecasts #172
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: "Score forecasts" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 9 * * 1" | |
jobs: | |
scores: | |
if: github.repository_owner == 'european-modelling-hubs' | |
runs-on: ubuntu-20.04 | |
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: Install system dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y libssl-dev libcurl4-openssl-dev pandoc | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Create score csv | |
run: Rscript 'code/evaluation/score_models.r' -l 52 | |
- name: Create summary csv | |
run: Rscript 'code/evaluation/aggregate_scores.r' | |
- name: Update evaluation README | |
run: Rscript -e 'rmarkdown::render("evaluation/README.Rmd")' | |
- name: Push evaluation csv | |
run: | | |
git config user.email "[email protected]" | |
git config user.name "GitHub Action - evaluation csv" | |
git add evaluation/* | |
git diff-index --quiet HEAD || git commit -m "Upload evaluation" | |
git pull --rebase origin main | |
git push | |
echo "pushed to github" | |
- name: Create issue about failure | |
if: failure() && github.event_name != 'workflow_dispatch' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh issue reopen 2635 |