Visualisation #2649
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: "Visualisation" | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "0 8,12 * * *" | |
jobs: | |
create-files: | |
if: github.repository_owner == 'european-modelling-hubs' | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- 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 -r github-actions/viz_requirements.txt | |
- 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 libcurl4-openssl-dev | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Prepare truth data | |
run: Rscript viz/prepare_truth_data.R | |
- name: Prepare metadata | |
run: Rscript viz/prepare_metadata.R | |
- name: Visualization (python) | |
run: | | |
python3 ./viz/prepare_forecast_data.py | |
- name: Upload files to Azure blob storage | |
env: | |
AZURE_STORAGE_ENDPOINT: ${{ secrets.AZURE_STORAGE_ENDPOINT }} | |
AZURE_STORAGE_KEY: ${{ secrets.AZURE_STORAGE_KEY }} | |
run: Rscript viz/upload_to_azure.R | |
- name: Create issue about failure | |
if: failure() && github.event_name != 'workflow_dispatch' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh issue reopen 2636 |