-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (55 loc) · 1.86 KB
/
validation.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
name: Validate XML files and generate statisitcs
on:
push: {}
repository_dispatch:
types: [run]
workflow_dispatch: {}
jobs:
build:
name: Validate XML files and generate statisitc
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: main
- name: Checkout gh_pages
uses: actions/checkout@v3
with:
ref: gh_pages
path: gh_pages
- name: Get python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: "pipenv"
- name: Validate XML files
run: |
python --version
python -m pip install pipenv
cd main/080_scripts_generic/validation
pipenv install
pipenv run jupyter nbconvert --to script validate.ipynb
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} pipenv run python validate.py
- name: Generate statistics
run: |
python --version
python -m pip install pipenv
cd main/080_scripts_generic/stats
pipenv install
pipenv run jupyter nbconvert --to script wibarab_featuredb_stats.ipynb
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} pipenv run python wibarab_featuredb_stats.py
- name: Commit errors to gh_pages
run: |
cp main/080_scripts_generic/validation/tmp/*.html gh_pages/
cp main/080_scripts_generic/stats/tmp/*.html gh_pages/
cd gh_pages
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add *.html
git commit -m "New validation results and statistics" -a || true
- name: Push changes back to GitHub
uses: ad-m/github-push-action@master
with:
branch: gh_pages
directory: gh_pages