11# This is work in progress, testing workflow in local/CI is gradually being transferred to tox
22
33# Usage instructions:
4+
45# `tox` will run all tests sequentially, `tox --parallel` will run all tests in parallel (much faster).
56# Run specific selection of tests with `tox -e pretest,<list-of-tests>,posttest` e.g., `tox -e pretest,test-api,test-launcher,posttest`
67# `--parallel` flag can be passed when running specific selections.
78
9+ # For packaging, build wheels for specific platform with `tox -e build-wheel -- <platform_name>`.
10+ # If `tox -e build-wheel` is run without passing a platform, tox will automatically build the ffl wheels based on the operating system
11+ # on which it is executing: windows -> "win_amd64", linux -> "manylinux_2_17_x86_64", mac -> "any"
12+
813[tox]
914description = Default tox environment list and core configurations
1015
11- # List all tests to run in parallel or sequential mode here
12- # So invocation can be specified as `tox`/`tox --parallel` to run all tests in sequential/parallel mode
1316envlist = pretest,test-{api,launcher,server,local_server,multi_server,remote_workflow,remote_operator,workflow,service,operators},posttest
1417
1518isolated_build_env = build
@@ -24,17 +27,6 @@ pass_env =
2427 ANSYSLMD_LICENSE_FILE
2528 AWP_ROOT242
2629
27- package = external # To allow custom wheel builds
28-
29- [testenv:build_external]
30- description = Environment for custom build of package wheels, solves PyDPF custom wheel building requirement
31-
32- package_glob = {toxinidir}{/}dist{/}ansys_dpf_core*
33-
34- # {on_platform} substitution to automatically detect os type.
35- commands =
36- python .ci/build_wheel.py -p {on_platform} -w
37-
3830[testenv:pretest]
3931description = Environment to kill servers and organize test files prior to testing
4032
@@ -115,4 +107,12 @@ deps =
115107 -r requirements/requirements_test.txt
116108
117109commands =
118- pytest {env:PYTEST_PYTHON_FILES} {env:DEBUG} {env:COVERAGE} {env:RERUNS} {env:JUNITXML}
110+ pytest {env:PYTEST_PYTHON_FILES} {env:DEBUG} {env:COVERAGE} {env:RERUNS} {env:JUNITXML}
111+
112+ [testenv:build-wheel]
113+ description = Environment for custom build of package wheels
114+
115+ skip_install = True
116+
117+ commands =
118+ python .ci/build_wheel.py -p {posargs:{on_platform}} -w
0 commit comments