From a4c7add349b5cd93683bb9550cfe305ec3d7d9c5 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Fri, 13 Dec 2024 16:09:20 +0100 Subject: [PATCH 1/2] tests: adding timeout to each test (#3621) * tests: adding timeout to each test * chore: adding changelog file 3621.added.md [dependabot-skip] --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- .github/workflows/ci.yml | 6 +++--- doc/changelog.d/3621.added.md | 1 + pyproject.toml | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 doc/changelog.d/3621.added.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2928f842f5..450a5deb10 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -33,7 +33,7 @@ env: DPF_PORT: 21004 MAPDL_PACKAGE: ghcr.io/ansys/mapdl ON_CI: True - PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=10 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html' + PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=10 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=40' BUILD_CHEATSHEET: True @@ -821,7 +821,7 @@ jobs: - name: "Unit testing requirements installation" run: | - python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order pyfakefs + python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order pyfakefs pytest-timeout - name: "Unit testing" env: @@ -929,7 +929,7 @@ jobs: - name: "Unit testing requirements installation" run: | - python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order + python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order pyfakefs pytest-timeout - name: "Unit testing" env: diff --git a/doc/changelog.d/3621.added.md b/doc/changelog.d/3621.added.md new file mode 100644 index 0000000000..b730a79cb4 --- /dev/null +++ b/doc/changelog.d/3621.added.md @@ -0,0 +1 @@ +tests: adding timeout to each test \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 58641de398..8076a4ad86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,6 +66,7 @@ tests = [ "pytest-pyvista==0.1.9", "pytest-random-order==1.1.1", "pytest-rerunfailures==15.0", + "pytest-timeout==2.3.1", "pytest==8.3.4", "scipy==1.14.1", "vtk==9.3.1", @@ -117,7 +118,7 @@ pymapdl_convert_script = "ansys.mapdl.core.cli:old_pymapdl_convert_script_entry_ pymapdl = "ansys.mapdl.core.cli:main" [tool.pytest.ini_options] -addopts = "-rxXsa -vvv --maxfail=10 --random-order-bucket=class --random-order --durations=10" +addopts = "-rxXsa -vvv --maxfail=10 --random-order-bucket=class --random-order --durations=10 --timeout=40" junit_family = "legacy" filterwarnings = [ "ignore::FutureWarning", From b5e482ad43674ab0a9547bb7a71a30423a3ed5c6 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Fri, 13 Dec 2024 18:28:57 +0100 Subject: [PATCH 2/2] ci: adding student back (#3623) * ci: adding student back * chore: adding changelog file 3623.maintenance.md [dependabot-skip] * ci: reducing number of test on minimal --------- Co-authored-by: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> --- .ci/build_matrix.sh | 10 +++++----- .github/workflows/ci.yml | 2 +- doc/changelog.d/3623.maintenance.md | 1 + 3 files changed, 7 insertions(+), 6 deletions(-) create mode 100644 doc/changelog.d/3623.maintenance.md diff --git a/.ci/build_matrix.sh b/.ci/build_matrix.sh index 8045341a18..cf6b38001a 100755 --- a/.ci/build_matrix.sh +++ b/.ci/build_matrix.sh @@ -95,11 +95,11 @@ for version in "${versions[@]}"; do fi # Skipping student versions on auth_user - if [[ "$auth_user" == "true" && "$ON_STUDENT" == "true" ]]; then - echo "Skipping student versions when user is authenticated" - echo "" - continue - fi + # if [[ "$auth_user" == "true" && "$ON_STUDENT" == "true" ]]; then + # echo "Skipping student versions when user is authenticated" + # echo "" + # continue + # fi # main logic if [[ "$auth_user" == "true" ]]; then diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 450a5deb10..633532d0a6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -615,7 +615,7 @@ jobs: - id: set-matrix env: ONLY_UBUNTU: true - LIMIT_VERSIONS: 3 + LIMIT_VERSIONS: 2 ON_SCHEDULE: ${{ github.event_name == 'schedule' }} ON_WORKFLOW_DISPATCH: ${{ github.event_name == 'workflow_dispatch' }} RUN_ALL_TEST: ${{ inputs.run_all_tests }} diff --git a/doc/changelog.d/3623.maintenance.md b/doc/changelog.d/3623.maintenance.md new file mode 100644 index 0000000000..f7b1bf3cdf --- /dev/null +++ b/doc/changelog.d/3623.maintenance.md @@ -0,0 +1 @@ +ci: adding student back \ No newline at end of file