Skip to content

Commit

Permalink
Remove "if: always()" from tests.yml and bump all pydpf-actions to v2…
Browse files Browse the repository at this point in the history
….3 (#1685)

* Remove "if: always()" from tests.yml and bump all pydpf-actions to v2.3

Signed-off-by: paul.profizi <paul.profizi@ansys.com>

* Remove "if: always()" from tests.yml and bump all pydpf-actions to v2.3 and fix concurrent artifact-upload

Signed-off-by: paul.profizi <paul.profizi@ansys.com>

* Fix artifact upload concurrency

Signed-off-by: paul.profizi <paul.profizi@ansys.com>

* Fix artifact upload concurrency

Signed-off-by: paul.profizi <paul.profizi@ansys.com>

* Fix artifact upload concurrency

Signed-off-by: paul.profizi <paul.profizi@ansys.com>

* Fix artifact upload concurrency

Signed-off-by: paul.profizi <paul.profizi@ansys.com>

* Update .github/workflows/tests.yml

Co-authored-by: BrunoClappe-Ansys <138895561+BClappe@users.noreply.github.com>

---------

Signed-off-by: paul.profizi <paul.profizi@ansys.com>
Co-authored-by: BrunoClappe-Ansys <138895561+BClappe@users.noreply.github.com>
  • Loading branch information
PProfizi and BClappe authored Aug 9, 2024
1 parent 52c4ce8 commit b7cc169
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 33 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ci_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
35 changes: 9 additions & 26 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,8 +139,8 @@ jobs:
echo "wheel_name=${name[0]}" >> $GITHUB_OUTPUT
- name: "Upload wheel to artifacts"
if: inputs.wheel == 'true'
uses: actions/upload-artifact@v3
if: (inputs.wheel == 'true') && !(inputs.test_any && (matrix.os == 'ubuntu-latest') )
uses: actions/upload-artifact@v4
with:
name: ${{ steps.wheel.outputs.wheel_name }}
path: dist/${{ steps.wheel.outputs.wheel_name }}
Expand All @@ -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 }}
Expand Down Expand Up @@ -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}}
Expand All @@ -215,7 +215,6 @@ jobs:
shell: pwsh
run: |
.github\workflows\scripts\separate_long_core_tests.ps1
if: always()
- name: "Set pytest arguments"
shell: bash
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -335,21 +323,18 @@ 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
working-directory: tests
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
Expand All @@ -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
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 == 'true' && '_any' || '' }}
path: tests/junit/test-results.xml
if: always()

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

0 comments on commit b7cc169

Please sign in to comment.