From 4d5ed61d560b6b8ebc3564975eaeb78c967369ba Mon Sep 17 00:00:00 2001 From: Zeitsperre <10819524+Zeitsperre@users.noreply.github.com> Date: Tue, 16 Apr 2024 16:59:05 -0400 Subject: [PATCH] split doctests from the notebooks_doctests build, add doctests to more builds --- .github/workflows/main.yml | 10 +++++----- tox.ini | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d1acec8ff..c8e808495 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -118,17 +118,17 @@ jobs: matrix: include: # Windows builds - - tox-env: py39-prefetch-coverage + - tox-env: py39-coverage-prefetch python-version: "3.9" markers: -m 'not slow' os: windows-latest # macOS builds - - tox-env: py310-coverage + - tox-env: py310-coverage-doctest python-version: "3.10" markers: -m 'not slow' os: macos-latest # Linux builds - - tox-env: py39-coverage-sbck + - tox-env: py39-coverage-sbck-doctest python-version: "3.9" markers: -m 'not slow' os: ubuntu-latest @@ -139,11 +139,11 @@ jobs: python-version: "3.11" markers: -m 'not slow' os: ubuntu-latest - - tox-env: py312-coverage-numba + - tox-env: py312-coverage-numba-doctest python-version: "3.12" markers: -m 'not slow' os: ubuntu-latest - - tox-env: notebooks_doctests + - tox-env: notebooks python-version: "3.10" os: ubuntu-latest - tox-env: offline-prefetch diff --git a/tox.ini b/tox.ini index 264aee431..78abbce02 100644 --- a/tox.ini +++ b/tox.ini @@ -3,7 +3,7 @@ min_version = 4.0 env_list = lint docs - notebooks_doctests + notebooks offline-prefetch py39-upstream-doctest py310 @@ -65,11 +65,11 @@ allowlist_externals = ;deps = ;extras = -[testenv:notebooks_doctests{-coverage,}] -description = Run notebooks and doctests with pytest under {basepython} +[testenv:notebooks] +description = Run notebooks with pytest under {basepython} commands = pytest --no-cov --nbval --dist=loadscope --rootdir=tests/ --ignore=docs/notebooks/example.ipynb docs/notebooks - pytest --rootdir=tests/ --xdoctest xclim +commands_post = [testenv:offline{-prefetch,}{-coverage,}] description = Run tests with pytest under {basepython}, preventing socket connections (except for unix sockets for async support) @@ -117,8 +117,8 @@ commands_pre = xclim --help commands = prefetch: xclim prefetch_testing_data - doctest: pytest --no-cov --rootdir=tests/ --xdoctest xclim pytest {posargs} + doctest: pytest --rootdir=tests/ --xdoctest xclim commands_post = coverage: - coveralls allowlist_externals =