Skip to content

Commit

Permalink
ci: Run the example notebooks during CI
Browse files Browse the repository at this point in the history
In the past, we had the issue several times that the capellambse API
would change underneath the example notebooks. This commit reruns the
notebooks during CI to help catch this type of issue more easily.
  • Loading branch information
Wuestengecko committed Nov 13, 2024
1 parent 751cc68 commit 88db0fc
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion .github/workflows/code-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
pypi:
name: Publish to PyPI
runs-on: ubuntu-latest
needs: [build, test]
needs: [build, test, example-notebooks]
if: startsWith(github.ref, 'refs/tags/v')
environment:
name: pypi
Expand All @@ -109,9 +109,32 @@ jobs:
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

example-notebooks:
name: Run and verify the example notebooks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
cache: pip
cache-dependency-path: pyproject.toml
python-version: "3.12"
- name: Upgrade pip
run: python -m pip install -U pip
- name: Install dependencies
run: python -m pip install '.[docs]'
- name: Run example notebooks
run: |-
for file in docs/source/examples/*.ipynb; do
jupyter nbconvert --to notebook --execute "$file" --output "$file" --ExecutePreprocessor.timeout "${NOTEBOOK_TIMEOUT_SEC:-300}"
done
docs:
name: Build documentation
runs-on: ubuntu-latest
needs: [example-notebooks]
permissions:
contents: write
steps:
Expand Down

0 comments on commit 88db0fc

Please sign in to comment.