Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ jobs:
with:
ANSYS_VERSION: ${{ inputs.ansys_version || vars.ANSYS_VERSION_DEFAULT }}
standalone_suffix: ${{needs.pick_server_suffix.outputs.suffix}}
test_any: true
secrets: inherit

docker_examples:
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/test_docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
ANSYS_VERSION:
required: false
type: string
test_any:
description: "Test the any version of the wheel"
required: false
type: string
default: 'false'
# Can be called manually
workflow_dispatch:
inputs:
Expand All @@ -24,6 +29,11 @@ on:
description: "ANSYS version to run."
required: false
type: string
test_any:
description: "Test the any version of the wheel"
required: false
type: string
default: 'false'

env:
PACKAGE_NAME: ansys-dpf-core
Expand Down Expand Up @@ -58,7 +68,9 @@ jobs:
- name: "Build the wheel"
shell: bash
run: |
if [ ${{ matrix.os }} == "ubuntu-latest" ]; then
if [ ${{ inputs.test_any }} == 'true' ]; then
export platform="any"
elif [ ${{ matrix.os }} == "ubuntu-latest" ]; then
export platform="manylinux_2_17"
else
export platform="win"
Expand Down
15 changes: 11 additions & 4 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@
running_docker = ansys.dpf.core.server_types.RUNNING_DOCKER.use_docker
local_test_repo = False

# Detect if gatebin binaries are available
IS_USING_GATEBIN = _try_use_gatebin()


def _get_test_files_directory():
if local_test_repo is False:
Expand All @@ -72,6 +75,10 @@ def _get_test_files_directory():
)


# Start a first global server to test for version
global_server = core.start_local_server(config=core.AvailableServerConfigs.LegacyGrpcServer)


@pytest.hookimpl()
def pytest_sessionfinish(session, exitstatus):
if os.name == "posix":
Expand Down Expand Up @@ -376,9 +383,6 @@ def return_ds(server=None):
)


IS_USING_GATEBIN = _try_use_gatebin()


def raises_for_servers_version_under(version):
"""Launch the test normally if the server version is equal or higher than the "version"
parameter. Else it makes sure that the test fails by raising a "DpfVersionNotSupported"
Expand Down Expand Up @@ -419,8 +423,11 @@ def remove_none_available_config(configs, config_names):
configs_out.append(conf)
config_names_out.append(conf_name)
elif running_docker:
unavailable_configs = [core.AvailableServerConfigs.InProcessServer]
if not IS_USING_GATEBIN:
unavailable_configs.append(core.AvailableServerConfigs.GrpcServer)
for conf, conf_name in zip(configs, config_names):
if conf != core.AvailableServerConfigs.InProcessServer:
if conf not in unavailable_configs:
configs_out.append(conf)
config_names_out.append(conf_name)

Expand Down
Loading