From b747a4d1d5cfc5ac21159d9a4a5b7a83c2a14263 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 5 Aug 2024 14:43:42 +0200 Subject: [PATCH 1/7] Remove "if: always()" from tests.yml and bump all pydpf-actions to v2.3 Signed-off-by: paul.profizi --- .github/workflows/tests.yml | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b85bd11e10..6d2fc20263 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -215,7 +215,6 @@ jobs: shell: pwsh run: | .github\workflows\scripts\separate_long_core_tests.ps1 - if: always() - name: "Set pytest arguments" shell: bash @@ -228,11 +227,9 @@ jobs: working-directory: tests run: | pytest $DEBUG $COVERAGE $RERUNS --junitxml=junit/test-results.xml . - if: always() - name: "Kill all servers" uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - if: always() - name: "Test API test_launcher" uses: nick-fields/retry@v2 @@ -245,7 +242,6 @@ jobs: - name: "Kill all servers" uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - if: always() - name: "Test API test_server" uses: nick-fields/retry@v2 @@ -255,11 +251,9 @@ jobs: shell: bash command: | pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results3.xml test_server/. - if: always() - name: "Kill all servers" uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - if: always() - name: "Test API test_local_server" uses: nick-fields/retry@v2 @@ -272,7 +266,6 @@ jobs: - name: "Kill all servers" uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - if: always() - name: "Test API test_multi_server" uses: nick-fields/retry@v2 @@ -285,7 +278,6 @@ jobs: - name: "Kill all servers" uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - if: always() - name: "Test API test_remote_workflow" uses: nick-fields/retry@v2 @@ -298,7 +290,6 @@ jobs: - name: "Kill all servers" uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - if: always() - name: "Test API test_remote_operator" shell: bash @@ -308,7 +299,6 @@ jobs: - name: "Kill all servers" uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - if: always() - name: "Test API test_workflow" uses: nick-fields/retry@v2 @@ -319,11 +309,9 @@ jobs: shell: bash command: | pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results8.xml test_workflow/. - if: always() - name: "Kill all servers" uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - if: always() - name: "Test API test_service" uses: nick-fields/retry@v2 @@ -335,8 +323,7 @@ jobs: pytest $DEBUG $COVERAGE $RERUNS --junitxml=tests/junit/test-results9.xml test_service/. - name: "Kill all servers" - uses: ansys/pydpf-actions/kill-dpf-servers@v2.2 - if: always() + uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - name: "Test API Entry" shell: bash @@ -344,12 +331,10 @@ jobs: run: | cd entry pytest $DEBUG $COVERAGE $RERUNS --junitxml=../junit/test-results10.xml . - if: always() timeout-minutes: 30 - name: "Kill all servers" - uses: ansys/pydpf-actions/kill-dpf-servers@v2.2 - if: always() + uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - name: "Test API test_custom_type_field" uses: nick-fields/retry@v2 @@ -361,15 +346,13 @@ jobs: pytest $DEBUG $COVERAGE $RERUNS --junitxml=../tests/junit/test-results11.xml test_custom_type_field/. - name: "Kill all servers" - uses: ansys/pydpf-actions/kill-dpf-servers@v2.2 - if: always() + uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - name: "Upload Test Results" uses: actions/upload-artifact@v3 with: name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }} path: tests/junit/test-results.xml - if: always() - name: "Upload coverage to Codecov" uses: codecov/codecov-action@v3 From 1752385de7efe243840cb9c4b5137c064575e6a2 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 5 Aug 2024 15:18:26 +0200 Subject: [PATCH 2/7] Remove "if: always()" from tests.yml and bump all pydpf-actions to v2.3 and fix concurrent artifact-upload Signed-off-by: paul.profizi --- .github/workflows/ci.yml | 2 +- .github/workflows/ci_release.yml | 6 +++--- .github/workflows/docs.yml | 4 ++-- .github/workflows/test_docker.yml | 2 +- .github/workflows/tests.yml | 6 +++--- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 79ec164ebf..9d95728749 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -98,7 +98,7 @@ jobs: cd .. - name: "Upload wheel any as artifact" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.wheel.outputs.wheel_name }} path: dist/${{ steps.wheel.outputs.wheel_name }} diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index 9ec8bac707..8a74e885e8 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -69,7 +69,7 @@ jobs: cd .. - name: "Upload wheel any as artifact" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.wheel.outputs.wheel_name }} path: dist/${{ steps.wheel.outputs.wheel_name }} @@ -79,7 +79,7 @@ jobs: with: ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }} python_versions: '["3.9", "3.10", "3.11"]' - wheel: true + wheel: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }} wheelhouse: true standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }} secrets: inherit @@ -89,7 +89,7 @@ jobs: with: ANSYS_VERSION: ${{ github.event.inputs.ansys_version || '251' }} python_versions: '["3.9", "3.10", "3.11"]' - wheel: true + wheel: ${{ matrix.python-version == env.MAIN_PYTHON_VERSION }} wheelhouse: false standalone_suffix: ${{ github.event.inputs.standalone_branch_suffix || '.pre0' }} test_any: true diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index aa2c261823..9f608f838c 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -180,7 +180,7 @@ jobs: if: always() - name: "Upload Documentation Build log" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: doc-${{env.PACKAGE_NAME}}-log path: doc/*.txt @@ -193,7 +193,7 @@ jobs: if: always() - name: "Upload HTML Documentation" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: HTML-doc-${{env.PACKAGE_NAME}}.zip path: HTML-doc-${{env.PACKAGE_NAME}}.zip diff --git a/.github/workflows/test_docker.yml b/.github/workflows/test_docker.yml index 65a04ff9b5..909cad5025 100644 --- a/.github/workflows/test_docker.yml +++ b/.github/workflows/test_docker.yml @@ -205,7 +205,7 @@ jobs: # timeout-minutes: 10 - name: "Upload Test Results" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_docker path: tests/junit/test-results.xml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 6d2fc20263..fbb528c381 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -140,7 +140,7 @@ jobs: - name: "Upload wheel to artifacts" if: inputs.wheel == 'true' - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ steps.wheel.outputs.wheel_name }} path: dist/${{ steps.wheel.outputs.wheel_name }} @@ -167,7 +167,7 @@ jobs: - name: "Upload wheelhouse to artifacts" if: inputs.wheelhouse == 'true' - uses: actions/upload-artifact@v3.1.2 + uses: actions/upload-artifact@v4 with: name: ${{ steps.wheelhouse.outputs.name }} path: ${{ steps.wheelhouse.outputs.name }} @@ -349,7 +349,7 @@ jobs: uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 - name: "Upload Test Results" - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }} path: tests/junit/test-results.xml From a33f4d0e8a26bdc812b1369b8438464ec8c80951 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 5 Aug 2024 15:46:06 +0200 Subject: [PATCH 3/7] Fix artifact upload concurrency Signed-off-by: paul.profizi --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index fbb528c381..7c58606c4b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -139,7 +139,7 @@ jobs: echo "wheel_name=${name[0]}" >> $GITHUB_OUTPUT - name: "Upload wheel to artifacts" - if: inputs.wheel == 'true' + if: (inputs.wheel == 'true') && !(inputs.test_any && (matrix.os == 'ubuntu-latest') ) uses: actions/upload-artifact@v4 with: name: ${{ steps.wheel.outputs.wheel_name }} @@ -351,7 +351,7 @@ jobs: - name: "Upload Test Results" uses: actions/upload-artifact@v4 with: - name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }} + name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_${{ inputs.test_any && 'any' || '' }} path: tests/junit/test-results.xml - name: "Upload coverage to Codecov" From 60dc7ef0b1384fad8d1e866fa902d74592052548 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 5 Aug 2024 16:11:55 +0200 Subject: [PATCH 4/7] Fix artifact upload concurrency Signed-off-by: paul.profizi --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7c58606c4b..4901e4cf40 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -351,7 +351,7 @@ jobs: - name: "Upload Test Results" uses: actions/upload-artifact@v4 with: - name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_${{ inputs.test_any && 'any' || '' }} + name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_${{ (inputs.test_any == 'true') && ('any' || '') }} path: tests/junit/test-results.xml - name: "Upload coverage to Codecov" From ea984f33498794177bff8daa1868da06fd056ab2 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 5 Aug 2024 16:12:23 +0200 Subject: [PATCH 5/7] Fix artifact upload concurrency Signed-off-by: paul.profizi --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 4901e4cf40..7d3d3d2421 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -351,7 +351,7 @@ jobs: - name: "Upload Test Results" uses: actions/upload-artifact@v4 with: - name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_${{ (inputs.test_any == 'true') && ('any' || '') }} + name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_${{ inputs.test_any == 'true' && 'any' || '' }} path: tests/junit/test-results.xml - name: "Upload coverage to Codecov" From a79bae8a45650946aa2742d6d27d8c3f39dc62f1 Mon Sep 17 00:00:00 2001 From: "paul.profizi" Date: Mon, 5 Aug 2024 17:49:37 +0200 Subject: [PATCH 6/7] Fix artifact upload concurrency Signed-off-by: paul.profizi --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 7d3d3d2421..f1e06f0b64 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -204,7 +204,7 @@ jobs: run: pip list - name: "Test Docstrings" - if: inputs.DOCSTRING == 'true' + if: (inputs.DOCSTRING == 'true') && !((inputs.test_any == 'true') && (matrix.os == 'ubuntu-latest')) uses: ansys/pydpf-actions/test_docstrings@v2.3 with: MODULE: ${{env.MODULE}} From 9e123184dd5215665956ee4a468e7e7f647eb2dd Mon Sep 17 00:00:00 2001 From: Paul Profizi <100710998+PProfizi@users.noreply.github.com> Date: Tue, 6 Aug 2024 10:12:29 +0200 Subject: [PATCH 7/7] Update .github/workflows/tests.yml Co-authored-by: BrunoClappe-Ansys <138895561+BClappe@users.noreply.github.com> --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f1e06f0b64..a8d4746c64 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -351,7 +351,7 @@ jobs: - name: "Upload Test Results" uses: actions/upload-artifact@v4 with: - name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}_${{ inputs.test_any == 'true' && 'any' || '' }} + name: ${{ env.PACKAGE_NAME }}_${{ matrix.python-version }}_${{ matrix.os }}_pytest_${{ inputs.ANSYS_VERSION }}${{ inputs.test_any == 'true' && '_any' || '' }} path: tests/junit/test-results.xml - name: "Upload coverage to Codecov"