Skip to content

Pypsa de merge

Pypsa de merge #89

Workflow file for this run

name: Validator Bot
on:
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run-validation:
name: Run validation
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: self-hosted
outputs:
validation_failed: ${{ steps.check_validation.outputs.failed }}
steps:
- uses: PyPSA/pypsa-validator@v0.2.5
id: validation
continue-on-error: true
with:
step: run-self-hosted-validation
env_file: envs/environment.yaml
snakemake_config: config/config.at.yaml
pre_command: "build_scenarios -f"
main_command: "all"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check validation status
id: check_validation
run: |
if [[ "${{ steps.validation.outcome }}" == "failure" ]]; then
echo "failed=true" >> $GITHUB_OUTPUT
else
echo "failed=false" >> $GITHUB_OUTPUT
fi
create-report:
name: Create report
needs: run-validation
if: |
github.event.pull_request.head.repo.full_name == github.repository &&
needs.run-validation.outputs.validation_failed != 'true'
runs-on: ubuntu-latest
steps:
- uses: PyPSA/pypsa-validator@v0.2.5
with:
step: create-comment
snakemake_config: config/config.at.yaml
# The path starting from prefix in config
# For plot results/<prefix>/<scenario>/<plot_name>.png pass
# <scenario>/<plot_name>.png
plots: >
"
AT10_KN2040/evaluation/HTML/sankey_diagram_EU_2050.html
"
validator_key: ${{ secrets.VALIDATOR_KEY }}