diff --git a/.github/ignore-notebooks.txt b/.github/ignore-notebooks.txt index 2df61e50..4f8e9ac0 100644 --- a/.github/ignore-notebooks.txt +++ b/.github/ignore-notebooks.txt @@ -2,4 +2,4 @@ doc2cache_llama3_1 semantic_caching_gemini 01_collaborative_filtering -05_nvidia_ai_rag_redis \ No newline at end of file +05_nvidia_ai_rag_redis diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c2f81f15..d93f8977 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -64,14 +64,21 @@ jobs: fi echo "All valid notebooks: $NB_JSON" - - # 5) Write to $GITHUB_OUTPUT (modern approach instead of ::set-output) - echo "notebooks=$NB_JSON" >> $GITHUB_OUTPUT + # 5) Write to $GITHUB_OUTPUT + if [ "$NB_JSON" != "[]" ]; then + echo "has_notebooks=true" >> $GITHUB_OUTPUT + else + echo "has_notebooks=false" >> $GITHUB_OUTPUT + fi + + echo "notebooks=$NB_JSON" >> $GITHUB_OUTPUT + # --------------------------------------------------------- # 2) Test each changed notebook in parallel # --------------------------------------------------------- test_notebooks: + if: ${{ needs.gather_notebooks.outputs.has_notebooks == 'true' }} needs: gather_notebooks runs-on: ubuntu-latest strategy: