Skip to content

Commit 09a47ce

Browse files
committed
[MNT] add doctests
1 parent 96919a5 commit 09a47ce

File tree

1 file changed

+56
-0
lines changed

1 file changed

+56
-0
lines changed

.github/workflows/test.yml

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ jobs:
5555
5656
test-no-extras:
5757
name: test-no-extras
58+
needs: [code-quality, doctest]
5859
strategy:
5960
matrix:
6061
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
@@ -92,6 +93,7 @@ jobs:
9293
9394
test-all-extras:
9495
name: test-all-extras
96+
needs: [code-quality, doctest]
9597
strategy:
9698
matrix:
9799
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
@@ -129,6 +131,7 @@ jobs:
129131
130132
test-sklearn-versions:
131133
name: test-sklearn-${{ matrix.sklearn-version }}-python-${{ matrix.python-version }}
134+
needs: [code-quality, doctest]
132135
runs-on: ubuntu-latest
133136

134137
strategy:
@@ -157,8 +160,61 @@ jobs:
157160
run: |
158161
python -m pytest -x -p no:warnings src/hyperactive/integrations/sklearn/
159162
163+
doctest:
164+
name: doctest
165+
runs-on: ubuntu-latest
166+
timeout-minutes: 10
167+
168+
steps:
169+
- uses: actions/checkout@v4
170+
171+
- name: Set up Python 3.11
172+
uses: actions/setup-python@v5
173+
with:
174+
python-version: "3.11"
175+
176+
- name: Install dependencies
177+
run: |
178+
python -m pip install --upgrade pip
179+
python -m pip install .[test]
180+
181+
- name: Run doctests
182+
run: |
183+
python -m pytest --doctest-modules src/hyperactive/ -v
184+
185+
coverage:
186+
name: coverage
187+
needs: [code-quality, doctest]
188+
runs-on: ubuntu-latest
189+
timeout-minutes: 15
190+
191+
steps:
192+
- uses: actions/checkout@v4
193+
194+
- name: Set up Python 3.11
195+
uses: actions/setup-python@v5
196+
with:
197+
python-version: "3.11"
198+
199+
- name: Install dependencies
200+
run: |
201+
python -m pip install --upgrade pip
202+
python -m pip install .[all_extras,test,test_parallel_backends]
203+
204+
- name: Run tests with coverage
205+
run: |
206+
python -m pytest src/hyperactive/ --cov=src/hyperactive --cov-report=xml --cov-report=term -p no:warnings
207+
208+
- name: Upload coverage to Codecov
209+
uses: codecov/codecov-action@v5
210+
with:
211+
files: ./coverage.xml
212+
fail_ci_if_error: false
213+
verbose: true
214+
160215
test-examples:
161216
name: test-examples
217+
needs: [code-quality, doctest]
162218
runs-on: ubuntu-latest
163219
timeout-minutes: 15
164220

0 commit comments

Comments
 (0)