-
Notifications
You must be signed in to change notification settings - Fork 94
70 lines (57 loc) · 1.88 KB
/
check-truth.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Check Truth
# Controls when the action will run.
on:
workflow_dispatch:
schedule:
- cron: "0 13 * * *"
jobs:
build:
if: github.repository_owner == 'covid19-forecast-hub-europe'
runs-on: ubuntu-latest
env:
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"
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: 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 requirements
run: |
pip3 install pandas pyprojroot
- uses: r-lib/actions/setup-pandoc@v2
- name: Install R system requirements
run: |
sudo apt-get update
sudo apt-get install libcurl4-openssl-dev libicu-dev
- uses: r-lib/actions/setup-renv@v2
- name: Verify truth data
run: |
python3 code/validation/check_truth.py
- name: Check data for revisions
run: |
Rscript code/auto_download/check_revisions.R
- name: Create status page
run: |
Rscript -e 'rmarkdown::render("data-truth/README.Rmd")'
- name: Commit files
run: |
git config user.email "[email protected]"
git config user.name "GitHub Action - check truth"
git add --all
git commit -m "Check truth data"
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 2630