Check Truth #79
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: Check Truth | |
# Controls when the action will run. | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 13 * * *" | |
jobs: | |
build: | |
if: github.repository_owner == 'european-modelling-hubs' | |
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 |