Skip to content

Commit b7cc169

Browse files
PProfiziBClappe
andauthored
Remove "if: always()" from tests.yml and bump all pydpf-actions to v2.3 (#1685)
* Remove "if: always()" from tests.yml and bump all pydpf-actions to v2.3 Signed-off-by: paul.profizi <[email protected]> * Remove "if: always()" from tests.yml and bump all pydpf-actions to v2.3 and fix concurrent artifact-upload Signed-off-by: paul.profizi <[email protected]> * Fix artifact upload concurrency Signed-off-by: paul.profizi <[email protected]> * Fix artifact upload concurrency Signed-off-by: paul.profizi <[email protected]> * Fix artifact upload concurrency Signed-off-by: paul.profizi <[email protected]> * Fix artifact upload concurrency Signed-off-by: paul.profizi <[email protected]> * Update .github/workflows/tests.yml Co-authored-by: BrunoClappe-Ansys <[email protected]> --------- Signed-off-by: paul.profizi <[email protected]> Co-authored-by: BrunoClappe-Ansys <[email protected]>
1 parent 52c4ce8 commit b7cc169

File tree

5 files changed

+16
-33
lines changed

5 files changed

+16
-33
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ jobs:
9898
cd ..
9999
100100
- name: "Upload wheel any as artifact"
101-
uses: actions/upload-artifact@v3
101+
uses: actions/upload-artifact@v4
102102
with:
103103
name: ${{ steps.wheel.outputs.wheel_name }}
104104
path: dist/${{ steps.wheel.outputs.wheel_name }}

.github/workflows/ci_release.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
cd ..
7070
7171
- name: "Upload wheel any as artifact"
72-
uses: actions/upload-artifact@v3
72+
uses: actions/upload-artifact@v4
7373
with:
7474
name: ${{ steps.wheel.outputs.wheel_name }}
7575
path: dist/${{ steps.wheel.outputs.wheel_name }}
@@ -79,7 +79,7 @@ jobs:
7979
with:
8080
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
8181
python_versions: '["3.9", "3.10", "3.11"]'
82-
wheel: true
82+
wheel: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }}
8383
wheelhouse: true
8484
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
8585
secrets: inherit
@@ -89,7 +89,7 @@ jobs:
8989
with:
9090
ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }}
9191
python_versions: '["3.9", "3.10", "3.11"]'
92-
wheel: true
92+
wheel: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }}
9393
wheelhouse: false
9494
standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }}
9595
test_any: true

.github/workflows/docs.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
if: always()
181181

182182
- name: "Upload Documentation Build log"
183-
uses: actions/upload-artifact@v3
183+
uses: actions/upload-artifact@v4
184184
with:
185185
name: doc-${{env.PACKAGE_NAME}}-log
186186
path: doc/*.txt
@@ -193,7 +193,7 @@ jobs:
193193
if: always()
194194

195195
- name: "Upload HTML Documentation"
196-
uses: actions/upload-artifact@v3
196+
uses: actions/upload-artifact@v4
197197
with:
198198
name: HTML-doc-${{env.PACKAGE_NAME}}.zip
199199
path: HTML-doc-${{env.PACKAGE_NAME}}.zip

.github/workflows/test_docker.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ jobs:
205205
# timeout-minutes: 10
206206

207207
- name: "Upload Test Results"
208-
uses: actions/upload-artifact@v3
208+
uses: actions/upload-artifact@v4
209209
with:
210210
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_docker
211211
path: tests/junit/test-results.xml

.github/workflows/tests.yml

+9-26
Original file line numberDiff line numberDiff line change
@@ -139,8 +139,8 @@ jobs:
139139
echo "wheel_name=${name[0]}" >> $GITHUB_OUTPUT
140140
141141
- name: "Upload wheel to artifacts"
142-
if: inputs.wheel == 'true'
143-
uses: actions/upload-artifact@v3
142+
if: (inputs.wheel == 'true') && !(inputs.test_any && (matrix.os == 'ubuntu-latest') )
143+
uses: actions/upload-artifact@v4
144144
with:
145145
name: ${{ steps.wheel.outputs.wheel_name }}
146146
path: dist/${{ steps.wheel.outputs.wheel_name }}
@@ -167,7 +167,7 @@ jobs:
167167

168168
- name: "Upload wheelhouse to artifacts"
169169
if: inputs.wheelhouse == 'true'
170-
uses: actions/upload-artifact@v3.1.2
170+
uses: actions/upload-artifact@v4
171171
with:
172172
name: ${{ steps.wheelhouse.outputs.name }}
173173
path: ${{ steps.wheelhouse.outputs.name }}
@@ -204,7 +204,7 @@ jobs:
204204
run: pip list
205205

206206
- name: "Test Docstrings"
207-
if: inputs.DOCSTRING == 'true'
207+
if: (inputs.DOCSTRING == 'true') && !((inputs.test_any == 'true') && (matrix.os == 'ubuntu-latest'))
208208
uses: ansys/pydpf-actions/[email protected]
209209
with:
210210
MODULE: ${{env.MODULE}}
@@ -215,7 +215,6 @@ jobs:
215215
shell: pwsh
216216
run: |
217217
.github\workflows\scripts\separate_long_core_tests.ps1
218-
if: always()
219218
220219
- name: "Set pytest arguments"
221220
shell: bash
@@ -228,11 +227,9 @@ jobs:
228227
working-directory: tests
229228
run: |
230229
pytest $DEBUG $COVERAGE $RERUNS --junitxml=junit/test-results.xml .
231-
if: always()
232230
233231
- name: "Kill all servers"
234232
uses: ansys/pydpf-actions/[email protected]
235-
if: always()
236233

237234
- name: "Test API test_launcher"
238235
uses: nick-fields/retry@v2
@@ -245,7 +242,6 @@ jobs:
245242
246243
- name: "Kill all servers"
247244
uses: ansys/pydpf-actions/[email protected]
248-
if: always()
249245

250246
- name: "Test API test_server"
251247
uses: nick-fields/retry@v2
@@ -255,11 +251,9 @@ jobs:
255251
shell: bash
256252
command: |
257253
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results3.xml test_server/.
258-
if: always()
259254
260255
- name: "Kill all servers"
261256
uses: ansys/pydpf-actions/[email protected]
262-
if: always()
263257

264258
- name: "Test API test_local_server"
265259
uses: nick-fields/retry@v2
@@ -272,7 +266,6 @@ jobs:
272266
273267
- name: "Kill all servers"
274268
uses: ansys/pydpf-actions/[email protected]
275-
if: always()
276269

277270
- name: "Test API test_multi_server"
278271
uses: nick-fields/retry@v2
@@ -285,7 +278,6 @@ jobs:
285278
286279
- name: "Kill all servers"
287280
uses: ansys/pydpf-actions/[email protected]
288-
if: always()
289281

290282
- name: "Test API test_remote_workflow"
291283
uses: nick-fields/retry@v2
@@ -298,7 +290,6 @@ jobs:
298290
299291
- name: "Kill all servers"
300292
uses: ansys/pydpf-actions/[email protected]
301-
if: always()
302293

303294
- name: "Test API test_remote_operator"
304295
shell: bash
@@ -308,7 +299,6 @@ jobs:
308299
309300
- name: "Kill all servers"
310301
uses: ansys/pydpf-actions/[email protected]
311-
if: always()
312302

313303
- name: "Test API test_workflow"
314304
uses: nick-fields/retry@v2
@@ -319,11 +309,9 @@ jobs:
319309
shell: bash
320310
command: |
321311
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results8.xml test_workflow/.
322-
if: always()
323312
324313
- name: "Kill all servers"
325314
uses: ansys/pydpf-actions/[email protected]
326-
if: always()
327315

328316
- name: "Test API test_service"
329317
uses: nick-fields/retry@v2
@@ -335,21 +323,18 @@ jobs:
335323
pytest $DEBUG $COVERAGE $RERUNS --junitxml=tests/junit/test-results9.xml test_service/.
336324
337325
- name: "Kill all servers"
338-
uses: ansys/pydpf-actions/[email protected]
339-
if: always()
326+
uses: ansys/pydpf-actions/[email protected]
340327

341328
- name: "Test API Entry"
342329
shell: bash
343330
working-directory: tests
344331
run: |
345332
cd entry
346333
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../junit/test-results10.xml .
347-
if: always()
348334
timeout-minutes: 30
349335

350336
- name: "Kill all servers"
351-
uses: ansys/pydpf-actions/[email protected]
352-
if: always()
337+
uses: ansys/pydpf-actions/[email protected]
353338

354339
- name: "Test API test_custom_type_field"
355340
uses: nick-fields/retry@v2
@@ -361,15 +346,13 @@ jobs:
361346
pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results11.xml test_custom_type_field/.
362347
363348
- name: "Kill all servers"
364-
uses: ansys/pydpf-actions/[email protected]
365-
if: always()
349+
uses: ansys/pydpf-actions/[email protected]
366350

367351
- name: "Upload Test Results"
368-
uses: actions/upload-artifact@v3
352+
uses: actions/upload-artifact@v4
369353
with:
370-
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}
354+
name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}${{ inputs.test_any == 'true' && '_any' || '' }}
371355
path: tests/junit/test-results.xml
372-
if: always()
373356

374357
- name: "Upload coverage to Codecov"
375358
uses: codecov/codecov-action@v3

0 commit comments

Comments
 (0)