Skip to content

Commit 564dc73

Browse files
authored
Merge pull request #80 from bsipocz/CI_no_nbval_if_no_notebooks
CI: fixing test status when no notebooks were collected for testing
2 parents 1cea801 + 4af7b9c commit 564dc73

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

test_requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
pytest
22
nbval
3+
pytest-custom_exit_code

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ commands =
5555
# We only want to run CI in PRs for the notebooks we touched
5656
!buildhtml: bash -c 'if [[ $GITHUB_EVENT_NAME == pull_request ]]; then git fetch origin main --depth=1; git diff origin/main --name-only tutorials | grep .md; else find tutorials -name "*.md"; fi | grep -vf ignore_testing | xargs jupytext --to notebook '
5757

58-
!buildhtml: pytest --nbval-lax -vv --durations=10 tutorials
58+
!buildhtml: pytest --nbval-lax -vv --suppress-no-test-exit-code --durations=10 tutorials
5959
buildhtml: sphinx-build -b html . _build/html -D nb_execution_mode=auto -nWT --keep-going
6060
# SED magic to remove the toctree captions from the rendered index page while keeping them in the sidebar TOC
6161
buildhtml: sed -E -i.bak '/caption-text/{N; s/.+caption-text.+\n<ul>/<ul>/; P;D;}' _build/html/index.html

0 commit comments

Comments
 (0)