diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index bb55f562..5de4ea19 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -61,14 +61,6 @@ - name: spatial versions run: 'python -c "import geopandas; geopandas.show_versions();"' - - name: declare doctest run - run: | - if [[ $matrix.environment-file == 'ci/310-oldest.yaml' ]]; then - echo "DOCTEST='--doctest-modules'" >> "$GITHUB_ENV" - else - echo "DOCTEST=''" >> "$GITHUB_ENV" - fi - - name: run tests run: | pytest \ @@ -81,8 +73,17 @@ --cov-append \ --cov-report term-missing \ --cov-report xml \ - --timeout 60 \ - ${{ env.DOCTEST }} + --timeout 60 + + - name: run docstring tests + if: contains(matrix.environment-file, 'latest') || contains(matrix.environment-file, 'dev') + run: | + pytest \ + -v \ + -r a \ + -n auto \ + --color yes \ + --doctest-only spaghetti - name: codecov uses: codecov/codecov-action@v4 diff --git a/ci/310-latest.yaml b/ci/310-latest.yaml index 8b54d28d..a4cf8dbb 100644 --- a/ci/310-latest.yaml +++ b/ci/310-latest.yaml @@ -18,5 +18,6 @@ dependencies: - codecov - pytest - pytest-cov + - pytest-doctestplus - pytest-timeout - pytest-xdist diff --git a/ci/311-latest.yaml b/ci/311-latest.yaml index 1009c2cd..a5905322 100644 --- a/ci/311-latest.yaml +++ b/ci/311-latest.yaml @@ -18,5 +18,6 @@ dependencies: - codecov - pytest - pytest-cov + - pytest-doctestplus - pytest-timeout - pytest-xdist diff --git a/ci/312-dev.yaml b/ci/312-dev.yaml index bc08110e..d32b0418 100644 --- a/ci/312-dev.yaml +++ b/ci/312-dev.yaml @@ -14,6 +14,7 @@ dependencies: - codecov - pytest - pytest-cov + - pytest-doctestplus - pytest-timeout - pytest-xdist - pip: diff --git a/ci/312-latest.yaml b/ci/312-latest.yaml index f2dbf802..b862aaf2 100644 --- a/ci/312-latest.yaml +++ b/ci/312-latest.yaml @@ -18,6 +18,7 @@ dependencies: - codecov - pytest - pytest-cov + - pytest-doctestplus - pytest-timeout - pytest-xdist # for docs build action (this env only) diff --git a/pyproject.toml b/pyproject.toml index ba4dbc30..2906aa0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -52,6 +52,7 @@ docs = [ tests = [ "pytest", "pytest-cov", + "pytest-doctestplus", "pytest-timeout", "pytest-xdist", "codecov",