8000 Merge pull request #401 from p-thoma/fix_examples · tenpy/tenpy@06ef10b · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fix examples

Fix examples #1235

Workflow file for this run

name: Sphinx Build and Doctest
# Check if the documentation can be built and run the doctests
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
defaults:
run:
# https://github.com/marketplace/actions/setup-miniconda#use-a-default-shell
shell: bash -el {0}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup miniconda
uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
miniforge-variant: Mambaforge
use-mamba: true
activate-environment: tenpydoc
environment-file: doc/environment.yml
python-version: 3.11
- name: Build documentation
# -W treats warnings as errors, i.e. the action fails if there are warnings from sphinx
# --keep-going causes sphinx to not quit on a warning/error, so we get to see all of them
run: |
conda activate tenpydoc
python -m sphinx -W --keep-going -b html ./doc ./doc/sphinx_build
- name: Run doctests
run: python -m sphinx -b doctest ./doc ./doc/sphinx_build
0