File tree Expand file tree Collapse file tree 2 files changed +34
-3
lines changed Expand file tree Collapse file tree 2 files changed +34
-3
lines changed Original file line number Diff line number Diff line change @@ -94,13 +94,36 @@ jobs:
9494 run : |
9595 hatch env run --env ${{ matrix.dependency-set }} run
9696
97+ doctests :
98+ name : doctests
99+ runs-on : ubuntu-latest
100+ steps :
101+ - uses : actions/checkout@v4
102+ - name : Set up Python
103+ uses : actions/setup-python@v5
104+ with :
105+ python-version : ' 3.13'
106+ cache : ' pip'
107+ - name : Install Hatch
108+ run : |
109+ python -m pip install --upgrade pip
110+ pip install hatch
111+ - name : Set Up Hatch Env
112+ run : |
113+ hatch env create doctest
114+ hatch env run -e doctest list-env
115+ - name : Run Tests
116+ run : |
117+ hatch env run --env doctest run
118+
97119 test-complete :
98120 name : Test complete
99121
100122 needs :
101123 [
102124 test,
103125 test-upstream-and-min-deps,
126+ doctests
104127 ]
105128 if : always()
106129 runs-on : ubuntu-latest
@@ -111,4 +134,4 @@ jobs:
111134 contains(needs.*.result, 'cancelled')
112135 run : exit 1
113136 - name : Success
114- run : echo Success!
137+ run : echo Success!
Original file line number Diff line number Diff line change @@ -138,14 +138,22 @@ numpy = ["1.25", "2.1"]
138138features = [" gpu" ]
139139
140140[tool .hatch .envs .test .scripts ]
141- run-coverage = " pytest --cov-config=pyproject.toml --cov=pkg --cov=src --doctest-glob='*.rst' "
141+ run-coverage = " pytest --cov-config=pyproject.toml --cov=pkg --cov=src"
142142run-coverage-gpu = " pip install cupy-cuda12x && pytest -m gpu --cov-config=pyproject.toml --cov=pkg --cov=src"
143143run = " run-coverage --no-cov"
144144run-verbose = " run-coverage --verbose"
145145run-mypy = " mypy src"
146146run-hypothesis = " pytest --hypothesis-profile ci tests/test_properties.py tests/test_store/test_stateful*"
147147list-env = " pip list"
148148
149+ [tool .hatch .envs .doctest ]
150+ features = [" test" , " optional" ]
151+ description = " Test environment for doctests"
152+
153+ [tool .hatch .envs .doctest .scripts ]
154+ run = " pytest docs/user-guide --doctest-glob='*.rst'"
155+ list-env = " pip list"
156+
149157[tool .hatch .envs .gputest ]
150158dependencies = [
151159 " numpy~={matrix:numpy}" ,
@@ -351,7 +359,7 @@ ignore_errors = true
351359
352360[tool .pytest .ini_options ]
353361minversion = " 7"
354- testpaths = [" tests" , " docs" ]
362+ testpaths = [" tests" , " docs/user-guide " ]
355363log_cli_level = " INFO"
356364xfail_strict = true
357365asyncio_mode = " auto"
You can’t perform that action at this time.
0 commit comments