Skip to content

Commit 47e36e2

Browse files
Fix empty notebook array issue during testing (#59)
* fix empty notebook array issue
1 parent 0afc506 commit 47e36e2

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.github/ignore-notebooks.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
doc2cache_llama3_1
33
semantic_caching_gemini
44
01_collaborative_filtering
5-
05_nvidia_ai_rag_redis
5+
05_nvidia_ai_rag_redis

.github/workflows/test.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,14 +64,21 @@ jobs:
6464
fi
6565

6666
echo "All valid notebooks: $NB_JSON"
67-
68-
# 5) Write to $GITHUB_OUTPUT (modern approach instead of ::set-output)
69-
echo "notebooks=$NB_JSON" >> $GITHUB_OUTPUT
7067

68+
# 5) Write to $GITHUB_OUTPUT
69+
if [ "$NB_JSON" != "[]" ]; then
70+
echo "has_notebooks=true" >> $GITHUB_OUTPUT
71+
else
72+
echo "has_notebooks=false" >> $GITHUB_OUTPUT
73+
fi
74+
75+
echo "notebooks=$NB_JSON" >> $GITHUB_OUTPUT
76+
7177
# ---------------------------------------------------------
7278
# 2) Test each changed notebook in parallel
7379
# ---------------------------------------------------------
7480
test_notebooks:
81+
if: ${{ needs.gather_notebooks.outputs.has_notebooks == 'true' }}
7582
needs: gather_notebooks
7683
runs-on: ubuntu-latest
7784
strategy:

0 commit comments

Comments
 (0)