85
85
- name : " Separate long Core tests"
86
86
shell : pwsh
87
87
run : |
88
- New-Item -Path ".\" -Name "test_launcher" -ItemType "directory"
89
- New-Item -Path ".\" -Name "test_server" -ItemType "directory"
90
- New-Item -Path ".\" -Name "test_local_server" -ItemType "directory"
91
- New-Item -Path ".\" -Name "test_multi_server" -ItemType "directory"
92
- New-Item -Path ".\" -Name "test_workflow" -ItemType "directory"
93
- New-Item -Path ".\" -Name "test_remote_workflow" -ItemType "directory"
94
- New-Item -Path ".\" -Name "test_remote_operator" -ItemType "directory"
95
- Copy-Item -Path "tests\conftest.py" -Destination ".\test_launcher\"
96
- Copy-Item -Path "tests\conftest.py" -Destination ".\test_server\"
97
- Copy-Item -Path "tests\conftest.py" -Destination ".\test_local_server\"
98
- Copy-Item -Path "tests\conftest.py" -Destination ".\test_multi_server\"
99
- Copy-Item -Path "tests\conftest.py" -Destination ".\test_workflow\"
100
- Copy-Item -Path "tests\conftest.py" -Destination ".\test_remote_workflow\"
101
- Copy-Item -Path "tests\conftest.py" -Destination ".\test_remote_operator\"
102
- Copy-Item -Path "tests\test_launcher.py" -Destination ".\test_launcher\"
103
- Copy-Item -Path "tests\test_server.py" -Destination ".\test_server\"
104
- Copy-Item -Path "tests\test_local_server.py" -Destination ".\test_local_server\"
105
- Copy-Item -Path "tests\test_multi_server.py" -Destination ".\test_multi_server\"
106
- Copy-Item -Path "tests\test_workflow.py" -Destination ".\test_workflow\"
107
- Copy-Item -Path "tests\test_remote_workflow.py" -Destination ".\test_remote_workflow\"
108
- Copy-Item -Path "tests\test_remote_operator.py" -Destination ".\test_remote_operator\"
109
- Remove-Item -Path "tests\test_server.py"
110
- Remove-Item -Path "tests\test_launcher.py"
111
- Remove-Item -Path "tests\test_local_server.py"
112
- Remove-Item -Path "tests\test_multi_server.py"
113
- Remove-Item -Path "tests\test_workflow.py"
114
- Remove-Item -Path "tests\test_remote_workflow.py"
115
- Remove-Item -Path "tests\test_remote_operator.py"
88
+ .github\workflows\scripts\separate_long_core_tests.ps1
116
89
117
90
- name : " Test API"
118
91
shell : bash
@@ -129,7 +102,7 @@ jobs:
129
102
working-directory : test_launcher
130
103
run : |
131
104
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results2.xml --reruns 2 .
132
- if : always()
105
+
133
106
134
107
- name : " Kill all servers"
135
108
uses :
pyansys/pydpf-actions/[email protected]
@@ -211,6 +184,110 @@ jobs:
211
184
- name : " Upload coverage to Codecov"
212
185
uses : codecov/codecov-action@v3
213
186
187
+ docker_tests :
188
+ name : " Build and Test On Docker"
189
+ runs-on : ${{ matrix.os }}
190
+ strategy :
191
+ fail-fast : false
192
+ matrix :
193
+ python-version : ["3.8"]
194
+ os : ["ubuntu-latest"]
195
+
196
+ steps :
197
+ - uses : actions/checkout@v3
198
+
199
+ - name : " Build Docker Package"
200
+ uses :
pyansys/pydpf-actions/[email protected]
201
+ with :
202
+ python-version : ${{ matrix.python-version }}
203
+ ANSYS_VERSION : ${{env.ANSYS_VERSION}}
204
+ PACKAGE_NAME : ${{env.PACKAGE_NAME}}
205
+ MODULE : ${{env.MODULE}}
206
+ dpf-standalone-TOKEN : ${{secrets.DPF_PIPELINE}}
207
+ install_extras : plotting
208
+ wheelhouse : false
209
+ extra-pip-args : ${{ env.extra }}
210
+
211
+ - name : " Prepare Testing Environment"
212
+ uses :
pyansys/pydpf-actions/[email protected]
213
+ with :
214
+ DEBUG : true
215
+
216
+ - name : " Separate long Core tests"
217
+ shell : pwsh
218
+ run : |
219
+ .github\workflows\scripts\separate_long_core_tests.ps1
220
+
221
+ - name : " Test API"
222
+ shell : bash
223
+ working-directory : tests
224
+ run : |
225
+ pytest $DEBUG --cov=ansys.dpf.${{env.MODULE}} --cov-report=xml --cov-report=html --log-level=ERROR --junitxml=junit/test-results.xml --reruns 2 .
226
+ timeout-minutes : 20
227
+
228
+ - name : " Test API test_launcher"
229
+ shell : bash
230
+ working-directory : test_launcher
231
+ run : |
232
+ pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results2.xml --reruns 2 .
233
+ if : always()
234
+ timeout-minutes : 20
235
+
236
+ - name : " Test API test_server"
237
+ shell : bash
238
+ working-directory : test_server
239
+ run : |
240
+ pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results4.xml --reruns 2 .
241
+ if : always()
242
+ timeout-minutes : 10
243
+
244
+ - name : " Test API test_local_server"
245
+ shell : bash
246
+ working-directory : test_local_server
247
+ run : |
248
+ pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results5.xml --reruns 2 .
249
+ if : always()
250
+ timeout-minutes : 20
251
+
252
+ - name : " Test API test_multi_server"
253
+ shell : bash
254
+ working-directory : test_multi_server
255
+ run : |
256
+ pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results6.xml --reruns 2 .
257
+ timeout-minutes : 20
258
+
259
+ - name : " Test API test_remote_workflow"
260
+ shell : bash
261
+ working-directory : test_remote_workflow
262
+ run : |
263
+ pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results7.xml --reruns 2 .
264
+ timeout-minutes : 20
265
+
266
+ - name : " Test API test_remote_operator"
267
+ shell : bash
268
+ working-directory : test_remote_operator
269
+ run : |
270
+ pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results8.xml --reruns 2 .
271
+ timeout-minutes : 5
272
+
273
+ - name : " Test API test_workflow"
274
+ shell : bash
275
+ working-directory : test_workflow
276
+ run : |
277
+ pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results3.xml --reruns 3 .
278
+ if : always()
279
+ timeout-minutes : 20
280
+
281
+ - name : " Upload Test Results"
282
+ uses : actions/upload-artifact@v2
283
+ with :
284
+ name : ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ env.ANSYS_VERSION }}_docker
285
+ path : tests/junit/test-results.xml
286
+ if : always()
287
+
288
+ - name : " Upload coverage to Codecov"
289
+ uses : codecov/codecov-action@v3
290
+
214
291
docs :
215
292
name : " Documentation"
216
293
runs-on : windows-latest
@@ -403,6 +480,7 @@ jobs:
403
480
retro :
404
481
name : " Retro-compatibility"
405
482
runs-on : ${{ matrix.os }}
483
+
406
484
strategy :
407
485
fail-fast : false
408
486
matrix :
@@ -471,7 +549,7 @@ jobs:
471
549
shell : bash
472
550
working-directory : tests
473
551
run : |
474
- pytest $DEBUG --cov=ansys.dpf.${{env.MODULE}} --cov-report=xml --cov-report=html --log-level=ERROR --junitxml=junit/test-results.xml --reruns 2 .
552
+ pytest $DEBUG --cov=ansys.dpf.${{env.MODULE}} --cov-report=xml --cov-report=html --log-level=ERROR --junitxml=junit/test-results.xml --reruns 2 --ignore test_examples.py .
475
553
476
554
- name : " Kill all servers"
477
555
uses :
pyansys/pydpf-actions/[email protected]
@@ -482,7 +560,6 @@ jobs:
482
560
working-directory : test_launcher
483
561
run : |
484
562
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results2.xml --reruns 2 .
485
- if : always()
486
563
487
564
- name : " Kill all servers"
488
565
uses :
pyansys/pydpf-actions/[email protected]
@@ -493,7 +570,6 @@ jobs:
493
570
working-directory : test_server
494
571
run : |
495
572
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results4.xml --reruns 2 .
496
- if : always()
497
573
498
574
- name : " Kill all servers"
499
575
uses :
pyansys/pydpf-actions/[email protected]
@@ -504,7 +580,6 @@ jobs:
504
580
working-directory : test_local_server
505
581
run : |
506
582
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results5.xml --reruns 2 .
507
- if : always()
508
583
509
584
- name : " Kill all servers"
510
585
uses :
pyansys/pydpf-actions/[email protected]
@@ -515,7 +590,6 @@ jobs:
515
590
working-directory : test_multi_server
516
591
run : |
517
592
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results6.xml --reruns 2 .
518
- if : always()
519
593
520
594
- name : " Kill all servers"
521
595
uses :
pyansys/pydpf-actions/[email protected]
@@ -526,7 +600,6 @@ jobs:
526
600
working-directory : test_remote_workflow
527
601
run : |
528
602
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results7.xml --reruns 2 .
529
- if : always()
530
603
531
604
- name : " Kill all servers"
532
605
uses :
pyansys/pydpf-actions/[email protected]
@@ -537,7 +610,6 @@ jobs:
537
610
working-directory : test_remote_operator
538
611
run : |
539
612
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results8.xml --reruns 2 .
540
- if : always()
541
613
542
614
- name : " Kill all servers"
543
615
uses :
pyansys/pydpf-actions/[email protected]
@@ -548,7 +620,6 @@ jobs:
548
620
working-directory : test_workflow
549
621
run : |
550
622
pytest $DEBUG --cov=ansys.dpf.core --cov-report=xml --cov-report=html --cov-append --log-level=ERROR --junitxml=../tests/junit/test-results3.xml --reruns 3 .
551
- if : always()
552
623
553
624
- name : " Kill all servers"
554
625
uses :
pyansys/pydpf-actions/[email protected]
0 commit comments