Skip to content

Commit

Permalink
ci: add validator
Browse files Browse the repository at this point in the history
  • Loading branch information
lkstrp committed Sep 12, 2024
1 parent e8e0833 commit e338eab
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/validate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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:
- uses: lkstrp/pypsa-validator@dev
with:
step: run-self-hosted-validation
env_file: envs/environment.yaml
snakemake_config: config/test/config.validator.yaml
dev: true
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:
- uses: lkstrp/pypsa-validator@dev
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
"
validator_key: ${{ secrets.VALIDATOR_KEY }}
dev: true

0 comments on commit e338eab

Please sign in to comment.