Skip to content

Commit 8da12bd

Browse files
committed
Adding ignore logic to all tox envs
1 parent 8045dad commit 8da12bd

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tox.ini

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,17 @@ commands =
4545

4646
# Ignore testing the tutorials listed in ignore_testing file. We have some OS specific ignores,
4747
# too due to issues with e.g. multiprocessing and problems in upstream dependency
48-
!buildhtml: bash -c 'if python -c "import platform; print(platform.platform())" | grep -i macos; then cat ignore_osx_testing >> ignore_testing; fi'
49-
!buildhtml: bash -c 'if python -c "import platform; print(platform.platform())" | grep -i win; then cat ignore_windows_testing >> ignore_testing; fi'
50-
51-
!buildhtml: bash -c 'if [[ $CI == true ]]; then cat ignore_gha_testing >> ignore_testing; fi'
48+
bash -c 'if python -c "import platform; print(platform.platform())" | grep -i macos; then cat ignore_osx_testing >> ignore_testing; fi'
49+
bash -c 'if python -c "import platform; print(platform.platform())" | grep -i win; then cat ignore_windows_testing >> ignore_testing; fi'
50+
bash -c 'if [[ $CI == true ]]; then cat ignore_gha_testing >> ignore_testing; fi'
51+
bash -c 'if [[ $CIRCLECI == true ]]; then cat ignore_circleci_testing >> ignore_testing; fi'
5252

5353
# We only want to run CI in PRs for the notebooks we touched
5454
!buildhtml: bash -c 'if [[ $GITHUB_EVENT_NAME == pull_request && -z "$(grep force_run:all_tests ${GITHUB_EVENT_PATH})" ]]; 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 '
5555

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

58+
buildhtml: bash -c "find tutorials -name '*md' | grep -f ignore_testing | sort | uniq | xargs -n 1 sed -i '' -e 's|name: python3|name: python3\nskip_execution: true|g'"
5859
buildhtml: npx myst build --execute
5960
buildhtml: bash rm _build/html/*thebe*.js
6061

0 commit comments

Comments
 (0)