Skip to content

Commit

Permalink
ci: another possible optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
moe-ad committed Jan 31, 2025
1 parent 40bb5a5 commit 78a278b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -223,13 +223,13 @@ jobs:
if [ ${{ matrix.os }} == 'ubuntu-latest' ]; then
echo 'TOX_EXTRA_ARG=--installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv.deps+="-e dpf-standalone/v${{inputs.ANSYS_VERSION}}" -x testenv.commands_pre+="uv pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==9.2.20230527.dev0"' >> "$GITHUB_OUTPUT"
else
echo 'TOX_EXTRA_ARG=--installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv.deps+="-e dpf-standalone/v${{inputs.ANSYS_VERSION}}"' >> "$GITHUB_OUTPUT"
echo 'TOX_EXTRA_ARG=--installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv.deps+="-e dpf-standalone/v${{inputs.ANSYS_VERSION}}" -- -n logical' >> "$GITHUB_OUTPUT"
fi
else
if [ ${{ matrix.os }} == 'ubuntu-latest' ]; then
echo 'TOX_EXTRA_ARG=--installpkg dist/${{ steps.wheel.outputs.wheel_name }} -x testenv.commands_pre+="uv pip install --extra-index-url https://wheels.vtk.org vtk-osmesa==9.2.20230527.dev0"' >> "$GITHUB_OUTPUT"
else
echo 'TOX_EXTRA_ARG=--installpkg dist/${{ steps.wheel.outputs.wheel_name }}' >> "$GITHUB_OUTPUT"
echo 'TOX_EXTRA_ARG=--installpkg dist/${{ steps.wheel.outputs.wheel_name }} -- -n logical' >> "$GITHUB_OUTPUT"
fi
fi
Expand Down
1 change: 1 addition & 0 deletions requirements/requirements_test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ pytest==8.3.4
pytest-cov==5.0.0
pytest-order==1.3.0
pytest-rerunfailures==15.0
pytest-xdist==3.6.1
pyvista==0.44.2
vtk==9.3.1
5 changes: 5 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ pass_env =

deps =
-r requirements/requirements_test.txt
psutil

[testenv:build-wheel]
description = Environment for custom build of package wheels
Expand Down Expand Up @@ -158,6 +159,10 @@ setenv =
commands =
python -m pytest {env:PYTEST_PYTHON_FILES} {env:DEBUG} {env:COVERAGE} {env:RERUNS} {env:JUNITXML} {posargs}

command_post =
python -c "import psutil; proc_name = 'Ans.Dpf.Grpc'; nb_procs = len([proc.kill() for proc in psutil.process_iter() if proc_name in proc.name()]); \
print(f'Killed \{nb_procs} \{proc_name} processes.')"

[testenv:doc-{clean,links,html}]
description = Environment for documentation generation

Expand Down

0 comments on commit 78a278b

Please sign in to comment.