Merge pull request #1193 from VisLab/add_examples #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Notebook Tests | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'examples/**' | |
| - 'tests/test_notebooks.py' | |
| - 'pyproject.toml' | |
| - 'requirements*.txt' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'examples/**' | |
| - 'tests/test_notebooks.py' | |
| - 'pyproject.toml' | |
| - 'requirements*.txt' | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-notebooks: | |
| name: Test Jupyter Notebooks | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| submodules: true | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| pip install -e . | |
| # Install Jupyter dependencies for running notebooks | |
| pip install jupyter notebook nbformat nbconvert ipykernel | |
| - name: Test notebook structure and imports | |
| run: | | |
| python -m unittest tests.test_notebooks.TestNotebooks -v | |
| - name: Test notebook execution setup | |
| run: | | |
| python -m unittest tests.test_notebooks.TestNotebookExecution -v | |
| - name: List example notebooks | |
| run: | | |
| echo "Example notebooks found:" | |
| ls -la examples/*.ipynb |