@@ -27,15 +27,15 @@ jobs:
2727 # 1) Compare this commit/PR to 'main' and list changed notebooks
2828 git fetch --depth=1 origin main
2929 CHANGED_NOTEBOOKS=$(git diff --name-only origin/main | grep '\.ipynb$' || true)
30-
30+
3131 # 2) Load notebooks to ignore
3232 IGNORE_LIST=()
3333 while IFS= read -r skip_nb || [ -n "$skip_nb" ]; do
3434 # Skip empty lines or comment lines
3535 [[ -z "$skip_nb" || "$skip_nb" =~ ^# ]] && continue
3636 IGNORE_LIST+=("$skip_nb")
3737 done < .github/ignore-notebooks.txt
38-
38+
3939 # 3) Filter out ignored notebooks
4040 FILTERED_NBS=()
4141 for nb in $CHANGED_NOTEBOOKS; do
@@ -52,16 +52,16 @@ jobs:
5252 FILTERED_NBS+=("$nb")
5353 fi
5454 done
55-
55+
5656 # 4) Stuff into a single-line JSON array
5757 NB_JSON=$(printf '%s\n' "${FILTERED_NBS[@]}" \
5858 | jq -R . \
5959 | jq -s -c .)
60-
60+
6161 if [ -z "$NB_JSON" ] || [ "$NB_JSON" = "[]" ]; then
6262 NB_JSON="[]"
6363 fi
64-
64+
6565 echo "All valid notebooks: $NB_JSON"
6666
6767 # 5) Check if there's anything in FILTERED_NBS
@@ -104,7 +104,7 @@ jobs:
104104 python -m venv venv
105105 source venv/bin/activate
106106 pip install --upgrade pip setuptools wheel
107- pip install pytest nbval
107+ pip install --no-cache-dir pytest nbval
108108
109109 - name : Test notebook
110110 env :
@@ -113,4 +113,4 @@ jobs:
113113 run : |
114114 echo "Testing notebook: ${{ matrix.notebook }}"
115115 source venv/bin/activate
116- pytest --nbval-lax --disable-warnings "${{ matrix.notebook }}"
116+ pytest --nbval-lax --nbval-cell-timeout=300 -- disable-warnings "${{ matrix.notebook }}"
0 commit comments