Skip to content
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
9 changes: 5 additions & 4 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -75,19 +75,20 @@ commands =
# We only skip testing untouched tutorials in PRs; in cron and dispatch all should be tested. Make sure we don't jupytext non-notebook files.
!buildhtml: bash -c 'if [[ $GITHUB_EVENT_NAME == pull_request && -z "$(grep force_run:all_tests ${GITHUB_EVENT_PATH})" ]]; then grep -f changed_tutorials all_tutorials; else cat all_tutorials; fi | grep -vf ignore_testing | xargs jupytext --to notebook '

!buildhtml: bash -c "echo 'Notebooks ignored (not tested/executed) in this job:\n'; cat ignore_testing | sort | uniq"
!buildhtml: bash -c "echo 'Notebooks ignored (not tested/executed) in this job:'; cat ignore_testing | sort | uniq"

!buildhtml: pytest --nbval-lax -vv --suppress-no-test-exit-code --durations=10 tutorials

# We don't want to execute in rendering the ones we ignore for testing
buildhtml: bash -c 'grep -f ignore_testing all_tutorials > ignore_execute'
buildhtml: bash -c '(grep -f ignore_testing all_tutorials || true) > ignore_execute'

# On CircleCI rendering preview, we also don't want to execute anything that hasn't been modified
buildhtml: bash -c 'if [[ $CIRCLECI == true ]]; then grep -vf changed_tutorials all_tutorials >> ignore_execute; fi'
buildhtml: bash -c 'if [[ $CIRCLECI == true ]]; then (grep -vf changed_tutorials all_tutorials || true) >> ignore_execute; fi'

# sed -i needs a bit of hacky conditional on ubuntu to cover the case of an empty ignore
buildhtml: bash -c 'if [ -s ignore_execute ]; then for name in $(cat ignore_execute | sort| uniq); do if [ -z "$(head -n 20 ${name}| grep execute:)" ]; then sed -i -e "s|kernelspec:|execute:\n skip: true\nkernelspec:|g" ${name}; fi; done;fi'

buildhtml: bash -c "echo 'Notebooks ignored (not tested/executed) in this job:\n'; cat ignore_execute | sort | uniq"
buildhtml: bash -c "echo 'Notebooks ignored (not tested/executed) in this job:'; cat ignore_execute | sort | uniq"

# Using srtict so we fail with trackbacks and debug mode to have a richer log
# For full build we disable parallel runs to easy server load
Expand Down