@@ -90,3 +90,100 @@ jobs:
9090 - name : Test with pytest
9191 run : |
9292 pytest ./tests
93+
94+ codecov :
95+ name : py${{ matrix.python-version }} on ${{ matrix.os }}
96+ runs-on : ${{ matrix.os }}
97+ needs : code-quality
98+ env :
99+ MPLBACKEND : Agg # https://github.com/orgs/community/discussions/26434
100+ strategy :
101+ matrix :
102+ os : [ubuntu-latest, macos-latest, windows-latest]
103+ python-version : ["3.12"]
104+
105+ steps :
106+ - uses : actions/checkout@v5
107+
108+ - name : Install uv
109+ uses : astral-sh/setup-uv@v7
110+ with :
111+ enable-cache : true
112+
113+ - name : Set up Python ${{ matrix.python-version }}
114+ uses : actions/setup-python@v6
115+ with :
116+ python-version : ${{ matrix.python-version }}
117+
118+ - name : Display Python version
119+ run : python -c "import sys; print(sys.version)"
120+
121+ - name : Install dependencies
122+ shell : bash
123+ run : uv pip install ".[dev,all_extras]" --no-cache-dir
124+ env :
125+ UV_SYSTEM_PYTHON : 1
126+
127+ - name : Show dependencies
128+ run : uv pip list
129+
130+ - name : Generate coverage report
131+ run : |
132+ pip install pytest pytest-cov
133+ pytest --cov=./ --cov-report=xml
134+
135+ - name : Upload coverage to Codecov
136+ # if false in order to skip for now
137+ if : false
138+ uses : codecov/codecov-action@v5
139+ with :
140+ files : ./coverage.xml
141+ fail_ci_if_error : true
142+
143+ notebooks :
144+ runs-on : ubuntu-latest
145+ needs : code-quality
146+
147+ strategy :
148+ matrix :
149+ python-version : [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
150+ fail-fast : false
151+
152+ steps :
153+ - uses : actions/checkout@v5
154+
155+ - name : Install uv
156+ uses : astral-sh/setup-uv@v7
157+ with :
158+ enable-cache : true
159+
160+ - name : Set up Python ${{ matrix.python-version }}
161+ uses : actions/setup-python@v6
162+ with :
163+ python-version : ${{ matrix.python-version }}
164+
165+ - name : Display Python version
166+ run : python -c "import sys; print(sys.version)"
167+
168+ - name : Install dependencies
169+ shell : bash
170+ run : uv pip install ".[dev,all_extras,notebook_test]" --no-cache-dir
171+ env :
172+ UV_SYSTEM_PYTHON : 1
173+
174+ - name : Show dependencies
175+ run : uv pip list
176+
177+ # Discover all notebooks
178+ - name : Collect notebooks
179+ id : notebooks
180+ shell : bash
181+ run : |
182+ NOTEBOOKS=$(find cookbook -name '*.ipynb' -print0 | xargs -0 echo)
183+ echo "notebooks=$NOTEBOOKS" >> $GITHUB_OUTPUT
184+
185+ # Run all discovered notebooks with nbmake
186+ - name : Test notebooks
187+ shell : bash
188+ run : |
189+ uv run pytest --reruns 3 --nbmake --nbmake-timeout=3600 -vv ${{ steps.notebooks.outputs.notebooks }}
0 commit comments