|
55 | 55 |
|
56 | 56 | test-no-extras: |
57 | 57 | name: test-no-extras |
| 58 | + needs: [code-quality, doctest] |
58 | 59 | strategy: |
59 | 60 | matrix: |
60 | 61 | python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] |
|
92 | 93 |
|
93 | 94 | test-all-extras: |
94 | 95 | name: test-all-extras |
| 96 | + needs: [code-quality, doctest] |
95 | 97 | strategy: |
96 | 98 | matrix: |
97 | 99 | python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] |
@@ -129,6 +131,7 @@ jobs: |
129 | 131 |
|
130 | 132 | test-sklearn-versions: |
131 | 133 | name: test-sklearn-${{ matrix.sklearn-version }}-python-${{ matrix.python-version }} |
| 134 | + needs: [code-quality, doctest] |
132 | 135 | runs-on: ubuntu-latest |
133 | 136 |
|
134 | 137 | strategy: |
@@ -157,8 +160,61 @@ jobs: |
157 | 160 | run: | |
158 | 161 | python -m pytest -x -p no:warnings src/hyperactive/integrations/sklearn/ |
159 | 162 |
|
| 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 | + |
160 | 215 | test-examples: |
161 | 216 | name: test-examples |
| 217 | + needs: [code-quality, doctest] |
162 | 218 | runs-on: ubuntu-latest |
163 | 219 | timeout-minutes: 15 |
164 | 220 |
|
|
0 commit comments