-
Notifications
You must be signed in to change notification settings - Fork 7
51 lines (43 loc) · 1.29 KB
/
test-notebooks.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
name: Test notebooks
# Run the notebooks
on:
# pushes to main
push:
branches:
- main
# PRs
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
build:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
env:
# make pytest output in color
PY_COLORS: 1
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade setuptools build
python -m pip install --upgrade pytest nbmake
python -m pip install --upgrade numpy scipy matplotlib pyyaml h5py
- name: Build and install tenpy
run: |
python -m pip install 'physics-tenpy @ git+https://github.com/tenpy/tenpy'
- name: Run pytest on notebooks
# Note: we exclude the dmrg mixer notebook 12, since it runs very long.
# TODO: Excluding 14 temporarily, until it is debugged.
run: |
pytest --nbmake . \
--ignore=12_dmrg_mixer.ipynb \
--ignore=14_segment_half_infinite.ipynb \
-W ignore