forked from hed-standard/hed-python
-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (50 loc) · 1.36 KB
/
Copy pathnotebook_tests.yaml
File metadata and controls
60 lines (50 loc) · 1.36 KB
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
52
53
54
55
56
57
58
59
60
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@v5
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
- 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