|
7 | 7 | - master |
8 | 8 | - 'push-action/**' |
9 | 9 |
|
| 10 | +env: |
| 11 | + PYTEST_ADDOPTS: "--color=yes" |
| 12 | + |
10 | 13 | # Cancel running workflows when additional changes are pushed |
11 | 14 | # https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value |
12 | 15 | concurrency: |
|
57 | 60 | pip install -U setuptools wheel |
58 | 61 | pip install -e . |
59 | 62 | pip install -r requirements.txt |
| 63 | + pip install -r requirements-server.txt |
60 | 64 | pip install -r requirements-dev.txt |
61 | 65 |
|
62 | 66 | - name: Run pre-commit |
|
82 | 86 | pip install -U setuptools wheel |
83 | 87 | pip install -e . |
84 | 88 | pip install -r requirements.txt |
| 89 | + pip install -r requirements-server.txt |
85 | 90 | pip install -r requirements-dev.txt |
86 | 91 |
|
87 | 92 | - name: Pass generated OpenAPI schemas through validator.swagger.io |
@@ -162,7 +167,7 @@ jobs: |
162 | 167 | ports: |
163 | 168 | - 5432:5432 |
164 | 169 | elasticsearch: |
165 | | - image: elasticsearch:7.17.1 |
| 170 | + image: elasticsearch:7.17.7 |
166 | 171 | ports: |
167 | 172 | - 9200:9200 |
168 | 173 | - 9300:9300 |
@@ -191,25 +196,29 @@ jobs: |
191 | 196 | pip install -r requirements-dev.txt |
192 | 197 | pip install -r requirements-http-client.txt |
193 | 198 |
|
194 | | - - name: Run all tests (using `mongomock`) |
195 | | - run: pytest -rs -vvv --cov=./optimade/ --cov-report=xml tests/ |
| 199 | + - name: Run non-server tests |
| 200 | + run: pytest -rs -vvv --cov=./optimade/ --cov-report=xml tests/ --ignore tests/server |
| 201 | + |
| 202 | + - name: Install latest server dependencies |
| 203 | + run: pip install -r requirements-server.txt |
| 204 | + |
| 205 | + - name: Run server tests (using `mongomock`) |
| 206 | + run: pytest -rs -vvv --cov=./optimade/ --cov-report=xml --cov-append tests/server tests/filtertransformers |
196 | 207 | env: |
197 | 208 | OPTIMADE_DATABASE_BACKEND: 'mongomock' |
198 | 209 |
|
199 | | - |
200 | 210 | - name: Run server tests (using a real MongoDB) |
201 | | - run: pytest -rs -vvv --cov=./optimade/ --cov-report=xml --cov-append tests/server |
| 211 | + run: pytest -rs -vvv --cov=./optimade/ --cov-report=xml --cov-append tests/server tests/filtertransformers |
202 | 212 | env: |
203 | 213 | OPTIMADE_DATABASE_BACKEND: 'mongodb' |
204 | 214 |
|
205 | 215 | - name: Run server tests (using Elasticsearch) |
206 | | - run: pytest -rs -vvv --cov=./optimade/ --cov-report=xml --cov-append tests/server |
| 216 | + run: pytest -rs -vvv --cov=./optimade/ --cov-report=xml --cov-append tests/server tests/filtertransformers |
207 | 217 | env: |
208 | 218 | OPTIMADE_DATABASE_BACKEND: 'elastic' |
209 | 219 |
|
210 | 220 | - name: Install adapter conversion dependencies |
211 | | - run: | |
212 | | - pip install -r requirements-client.txt |
| 221 | + run: pip install -r requirements-client.txt |
213 | 222 |
|
214 | 223 | - name: Setup environment for AiiDA |
215 | 224 | env: |
@@ -246,22 +255,22 @@ jobs: |
246 | 255 | coverage run --append --source optimade optimade/client/cli.py \ |
247 | 256 | --filter 'nsites = 1' \ |
248 | 257 | --output-file test_get_async.json \ |
249 | | - https://optimade.herokuapp.com |
| 258 | + https://optimade.fly.dev |
250 | 259 | test test_get_async.json |
251 | 260 |
|
252 | 261 | coverage run --append --source optimade optimade/client/cli.py \ |
253 | 262 | --filter 'nsites = 1' \ |
254 | 263 | --count \ |
255 | 264 | --output-file test_count.json \ |
256 | | - https://optimade.herokuapp.com |
| 265 | + https://optimade.fly.dev |
257 | 266 | test test_count.json |
258 | 267 |
|
259 | 268 | coverage run --append --source optimade optimade/client/cli.py \ |
260 | 269 | --no-async \ |
261 | 270 | --filter 'nsites = 1' \ |
262 | 271 | --count \ |
263 | 272 | --output-file test_count_no_async.json \ |
264 | | - https://optimade.herokuapp.com |
| 273 | + https://optimade.fly.dev |
265 | 274 | test test_count_no_async.json |
266 | 275 |
|
267 | 276 | diff test_count_no_async.json test_count.json |
@@ -302,6 +311,7 @@ jobs: |
302 | 311 | pip install -U setuptools wheel |
303 | 312 | pip install -e . |
304 | 313 | pip install -r requirements.txt |
| 314 | + pip install -r requirements-server.txt |
305 | 315 | pip install -r requirements-dev.txt |
306 | 316 | pip install -r requirements-http-client.txt |
307 | 317 | pip install -r requirements-docs.txt |
|
0 commit comments