From 189341041f90d65b96077e1e1149a13ae8e811c3 Mon Sep 17 00:00:00 2001 From: moe-ad Date: Mon, 27 Jan 2025 09:08:35 +0100 Subject: [PATCH] ci: ANSYS_DPF_PATH approach --- .github/workflows/tests.yml | 50 +++++++++++++++++++++++++------------ 1 file changed, 34 insertions(+), 16 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 11d145c7af..7c9aaa2606 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -192,6 +192,11 @@ jobs: standalone_suffix: ${{ inputs.standalone_suffix }} ANSYS_VERSION : ${{inputs.ANSYS_VERSION}} + - name: "Set ANSYS_DPF_PATH environment variable" + shell: bash + run: | + echo ANSYS_DPF_PATH=dpf-standalone/v${{inputs.ANSYS_VERSION}}/ansys/dpf/* >> $GITHUB_ENV + - name: "Check licences of packages" uses: ansys/pydpf-actions/check-licenses@v2.3 @@ -229,10 +234,11 @@ jobs: # echo "COVERAGE=--cov=ansys.dpf.${{env.MODULE}} --cov-report=xml --cov-report=html --log-level=ERROR --cov-append" >> $GITHUB_ENV # echo "RERUNS=--reruns 2 --reruns-delay 1" >> $GITHUB_ENV - # - name: "Set environment variable to allow test targets access DPF server installation" - # shell: bash - # run: | - # echo "VIRTUALENV_SYSTEM_SITE_PACKAGES=true" >> $GITHUB_ENV + - name: "Set environment variable to allow test targets access DPF server installation" + shell: bash + run: | + echo "ANSYS_DPF_PATH=dpf-standalone/v${{inputs.ANSYS_VERSION}}" >> $GITHUB_ENV +# echo "VIRTUALENV_SYSTEM_SITE_PACKAGES=true" >> $GITHUB_ENV - name: "Organize test files" shell: bash @@ -247,7 +253,8 @@ jobs: - name: "Test API" shell: bash run: | - tox -e test-api --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-api.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-api --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-api --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-api.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 @@ -259,7 +266,8 @@ jobs: max_attempts: 2 shell: bash command: | - tox -e test-launcher --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-launcher.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-launcher --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-launcher --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-launcher.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 @@ -271,7 +279,8 @@ jobs: max_attempts: 2 shell: bash command: | - tox -e test-server --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-server.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-server --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-server --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-server.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 @@ -283,7 +292,8 @@ jobs: max_attempts: 2 shell: bash command: | - tox -e test-local_server --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-local_server.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-local_server --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-local_server --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-local_server.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 @@ -295,7 +305,8 @@ jobs: max_attempts: 2 shell: bash command: | - tox -e test-multi_server --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-multi_server.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-multi_server --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-multi_server --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-multi_server.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 @@ -307,7 +318,8 @@ jobs: max_attempts: 3 shell: bash command: | - tox -e test-remote_workflow --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-remote_workflow.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-remote_workflow --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-remote_workflow --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-remote_workflow.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 @@ -316,7 +328,8 @@ jobs: shell: bash working-directory: test_remote_operator run: | - tox -e test-remote_operator --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-remote_operator.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-remote_operator --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-remote_operator --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-remote_operator.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 @@ -329,7 +342,8 @@ jobs: retry_wait_seconds: 15 shell: bash command: | - tox -e test-workflow --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-workflow.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-workflow --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-workflow --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-workflow.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 @@ -341,7 +355,8 @@ jobs: max_attempts: 2 shell: bash command: | - tox -e test-service --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-service.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-service --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-service --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-service.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 @@ -349,7 +364,8 @@ jobs: - name: "Test API Entry" shell: bash run: | - tox -e test-api_entry --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-api_entry.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-api_entry --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-api_entry --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-api_entry.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' timeout-minutes: 30 # - name: "Kill all servers" @@ -362,7 +378,8 @@ jobs: max_attempts: 2 shell: bash command: | - tox -e test-custom_type_field --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-custom_type_field.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-custom_type_field --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-custom_type_field --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-custom_type_field.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3 @@ -374,7 +391,8 @@ jobs: max_attempts: 2 shell: bash command: | - tox -e test-operators --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-operators.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' + tox -e test-operators --installpkg dist/${{ steps.wheel.outputs.wheel_name }} +# tox -e test-operators --installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv:test-operators.deps+='dpf-standalone/v${{inputs.ANSYS_VERSION}}' # - name: "Kill all servers" # uses: ansys/pydpf-actions/kill-dpf-servers@v2.3