Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci[patch]: Make notebook validation only run in core_docs #6312

Merged
merged 1 commit into from
Aug 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .github/workflows/validate_new_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,23 @@ jobs:
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44
- name: Check for new or modified notebooks
- name: Check for new or modified notebooks in docs/core_docs
id: check_notebooks
run: |
notebooks=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ' ' '\n' | grep '\.ipynb$' || true)
notebooks=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ' ' '\n' | grep '^docs/core_docs/.*\.ipynb$' || true)
echo "Affected notebooks: $notebooks"
echo "has_affected_notebooks=$([ -n "$notebooks" ] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
- name: Build examples
if: steps.check_notebooks.outputs.has_affected_notebooks == 'true'
run: yarn turbo:command build --filter=examples
- name: Validate affected notebooks
- name: Validate affected notebooks in docs/core_docs
if: steps.check_notebooks.outputs.has_affected_notebooks == 'true'
run: |
notebooks=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ' ' '\n' | grep '\.ipynb$' || true)
notebooks=$(echo '${{ steps.changed-files.outputs.all_changed_files }}' | tr ' ' '\n' | grep '^docs/core_docs/.*\.ipynb$' || true)
if [ -n "$notebooks" ]; then
for notebook in $notebooks; do
yarn notebook:validate "$notebook"
done
else
echo "No notebooks to validate."
echo "No notebooks in docs/core_docs to validate."
fi
Loading