-
Notifications
You must be signed in to change notification settings - Fork 7
63 lines (58 loc) · 1.82 KB
/
validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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
runs-on: self-hosted
steps:
- uses: lkstrp/pypsa-validator@main
with:
step: run-self-hosted-validation
env_file: environment.yaml
snakemake_config: config/config.yaml
pre_command: "-call build_scenarios -f"
upload-artifacts:
name: Upload artifacts
needs: run-validation
runs-on: self-hosted
strategy:
matrix:
include:
- {artifact_name: "results (feature branch)", path: "~/${{ github.repository }}/feature/results"}
- {artifact_name: "results (base branch)", path: "~/${{ github.repository }}/main/results"}
- {artifact_name: "validator-metadata", path: "~/${{ github.repository }}/validator-metadata.yml"}
steps:
- name: Upload artifacts - ${{ matrix.artifact_name }}
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: |
${{ matrix.path }}
if-no-files-found: error
retention-days: 90
comment-on-pr:
name: Comment on pull request
needs: upload-artifacts
runs-on: ubuntu-latest
steps:
- uses: lkstrp/pypsa-validator@main
with:
step: create-comment
snakemake_config: config/config.yaml
# The path starting from prefix in config
# For plot results/<prefix>/<scenario>/<plot_name>.png pass
# <scenario>/<plot_name>.png
plots: >
"
KN2045_Bal_v4/ariadne/primary_energy.png
KN2045_Bal_v4/ariadne/secondary_energy.png
KN2045_Bal_v4/ariadne/final_energy.png
"
repo_private_key: ${{ secrets.REPO_PLOTS_PRIVATE_KEY }}