-
Notifications
You must be signed in to change notification settings - Fork 94
51 lines (43 loc) · 1.42 KB
/
scoring.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
42
43
44
45
46
47
48
49
50
51
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 libopenblas-base libopenblas-dev
- 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