-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ignore deleted files for conversion to ipynb
- Loading branch information
Showing
1 changed file
with
60 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,60 @@ | ||
name: Build and Test code in notebooks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
|
||
build-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v41 | ||
with: | ||
dir_names_max_depth: 0 | ||
files: | | ||
docs/source/*.rst | ||
docs/source/**/*.rst | ||
!docs/source/**/_templates | ||
- uses: r-lib/actions/setup-pandoc@v2 | ||
with: | ||
pandoc-version: '3.1.2' | ||
|
||
# - uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: '3.7' # Version range or exact version of a Python version to use, using SemVer's version range syntax | ||
|
||
- name: Installing Dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install --upgrade pandocfilters jupyter | ||
python3 -m pip install --upgrade -r requirements.txt | ||
- name: Generating notebooks | ||
run: | | ||
pushd docs/source | ||
./generate_ipynb.sh | ||
popd | ||
- name: Execute all notebooks generated from modified files | ||
run: | | ||
for file in ${{ steps.changed-files.outputs.all_modified_files }}; do | ||
jupyter nbconvert --to notebook --inplace --execute ${file%.rst}.ipynb || (echo "${file%.rst}" >> failed_nbs.txt) | ||
done | ||
if [ -f "failed_nbs.txt" ]; then | ||
echo "Some notebooks failed to run. Please check logs." | ||
cat failed_nbs.txt | ||
exit 1 | ||
fi | ||
name: Build and Test code in notebooks | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
|
||
build-test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.10' # Version range or exact version of a Python version to use, using SemVer's version range syntax | ||
|
||
- name: Get changed files | ||
id: changed-files | ||
uses: tj-actions/changed-files@v45 | ||
with: | ||
dir_names_max_depth: 0 | ||
files: | | ||
docs/source/*.rst | ||
docs/source/**/*.rst | ||
!docs/source/**/_templates | ||
- uses: r-lib/actions/setup-pandoc@v2 | ||
with: | ||
pandoc-version: '3.1.2' | ||
|
||
# - uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: '3.7' # Version range or exact version of a Python version to use, using SemVer's version range syntax | ||
|
||
- name: Installing Dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install --upgrade pandocfilters jupyter | ||
python3 -m pip install --upgrade -r requirements.txt | ||
- name: Generating notebooks | ||
run: | | ||
pushd docs/source | ||
./generate_ipynb.sh | ||
popd | ||
- name: Execute all notebooks generated from modified files | ||
run: | | ||
for file in ${{ steps.changed-files.outputs.all_changed_files }}; do | ||
jupyter nbconvert --to notebook --inplace --execute ${file%.rst}.ipynb || (echo "${file%.rst}" >> failed_nbs.txt) | ||
done | ||
if [ -f "failed_nbs.txt" ]; then | ||
echo "Some notebooks failed to run. Please check logs." | ||
cat failed_nbs.txt | ||
exit 1 | ||
fi |