Merge pull request #1292 from VisLab/fix_extras #8
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: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| cache-dependency-glob: "**/pyproject.toml" | |
| - name: Create virtual environment | |
| run: | | |
| uv venv --clear .venv | |
| echo "$GITHUB_WORKSPACE/.venv/bin" >> $GITHUB_PATH | |
| - name: Install dependencies | |
| run: uv pip install -e ".[examples]" | |
| - 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 |