2024-09-13 13:56:29 +00:00
|
|
|
name: Validator Bot
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- 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
|
|
|
|
steps:
|
2024-09-25 06:24:19 +00:00
|
|
|
- uses: lkstrp/pypsa-validator@v0.2.2
|
2024-09-13 13:56:29 +00:00
|
|
|
with:
|
|
|
|
step: run-self-hosted-validation
|
|
|
|
env_file: envs/environment.yaml
|
|
|
|
snakemake_config: config/test/config.validator.yaml
|
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
|
|
create-report:
|
|
|
|
name: Create report
|
|
|
|
if: github.event.pull_request.head.repo.full_name == github.repository
|
|
|
|
needs: run-validation
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-09-25 06:24:19 +00:00
|
|
|
- uses: lkstrp/pypsa-validator@v0.2.2
|
2024-09-13 13:56:29 +00:00
|
|
|
with:
|
|
|
|
step: create-comment
|
|
|
|
snakemake_config: config/test/config.validator.yaml
|
|
|
|
# The path starting from prefix in config
|
|
|
|
# For plot results/<prefix>/<scenario>/<plot_name>.png pass
|
|
|
|
# <scenario>/<plot_name>.png
|
|
|
|
plots: >
|
|
|
|
"
|
|
|
|
graphs/energy.svg
|
|
|
|
graphs/costs.svg
|
|
|
|
graphs/balances-energy.svg
|
2024-09-17 12:00:40 +00:00
|
|
|
graphs/balances-urban_central_heat.svg
|
|
|
|
graphs/balances-urban_decentral_heat.svg
|
|
|
|
graphs/balances-rural_heat.svg
|
2024-09-13 13:56:29 +00:00
|
|
|
"
|
|
|
|
validator_key: ${{ secrets.VALIDATOR_KEY }}
|