Skip to content

Commit

Permalink
#770 -- doctests after full tests (#771)
Browse files Browse the repository at this point in the history
* RLS: v1.7.5.post1

* seperate docstring tests

* proper line break

* proper indent

* reduce options

* need pytest-doctestplus req

* swap logic

* add req to toml
  • Loading branch information
jGaboardi authored Jun 21, 2024
1 parent e2c54d6 commit 7678abf
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 10 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions ci/310-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ dependencies:
- codecov
- pytest
- pytest-cov
- pytest-doctestplus
- pytest-timeout
- pytest-xdist
1 change: 1 addition & 0 deletions ci/311-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ dependencies:
- codecov
- pytest
- pytest-cov
- pytest-doctestplus
- pytest-timeout
- pytest-xdist
1 change: 1 addition & 0 deletions ci/312-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies:
- codecov
- pytest
- pytest-cov
- pytest-doctestplus
- pytest-timeout
- pytest-xdist
- pip:
Expand Down
1 change: 1 addition & 0 deletions ci/312-latest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ dependencies:
- codecov
- pytest
- pytest-cov
- pytest-doctestplus
- pytest-timeout
- pytest-xdist
# for docs build action (this env only)
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ docs = [
tests = [
"pytest",
"pytest-cov",
"pytest-doctestplus",
"pytest-timeout",
"pytest-xdist",
"codecov",
Expand Down

0 comments on commit 7678abf

Please sign in to comment.