Skip to content

Commit b6671cc

Browse files
committed
test for notebooks
1 parent 73b4d26 commit b6671cc

1 file changed

Lines changed: 50 additions & 0 deletions

File tree

.github/workflows/notebooks.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: notebooks
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
python-version: [ '3.10', '3.11', '3.12', '3.13', '3.14' ]
18+
notebook: [ 1-RiskReturnModels.ipynb,
19+
2-Mean-Variance-Optimisation.ipynb,
20+
3-Advanced-Mean-Variance-Optimisation.ipynb,
21+
4-Black-Litterman-Allocation.ipynb,
22+
5-Hierarchical-Risk-Parity.ipynb]
23+
#exclude:
24+
# - python-version: '3.11'
25+
# notebook: Ch10-deeplearning-lab.ipynb
26+
27+
fail-fast: false
28+
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
# Use the composite action to set up the project
33+
- name: Setup the project
34+
id: setup
35+
uses: ./.github/actions/setup-project
36+
with:
37+
python-version: ${{ matrix.python-version }}
38+
39+
# Install nbmake
40+
- name: Install requirements
41+
shell: bash
42+
run: |
43+
uv pip install nbmake
44+
45+
# Run the notebooks
46+
- name: Test
47+
shell: bash
48+
run: |
49+
uv run pytest --nbmake --nbmake-timeout=3600 -vv ${{ matrix.notebook }}
50+

0 commit comments

Comments
 (0)