-
Notifications
You must be signed in to change notification settings - Fork 8
45 lines (38 loc) · 1.15 KB
/
run-docs-code.yaml
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
name: Run Demo
on: [push, pull_request]
jobs:
tests:
name: Run Demo
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
ENV_NAME: testing
strategy:
fail-fast: false
matrix:
demo: ["end_to_end_example", "hera_sim_defaults", "hera_sim_simulator", "hera_sim_tour", "mutual_coupling_example", "polybeam_simulation", "visibility_simulator"]
steps:
- uses: actions/checkout@master
with:
fetch-depth: 1
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install
run: |
pip install --upgrade pip
pip install .[tests]
pip install papermill ipykernel
- name: Install ipykernel
run: python -m ipykernel install --user --name herasim
- name: Run Notebook
run: |
papermill -k herasim docs/tutorials/${{ matrix.demo }}.ipynb output-${{ matrix.demo }}.ipynb
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.demo }}
path: output-${{ matrix.demo }}.ipynb