From a2d1951ce172f2ebb4734545ab8ec250574934e7 Mon Sep 17 00:00:00 2001 From: German <28149841+germa89@users.noreply.github.com> Date: Thu, 7 Sep 2023 08:01:20 +0200 Subject: [PATCH] Allowing extended testing on dispatch (optional) and schedule (#2312) * Allowing extended testing on dispatch (optional) and schedule * Removing repeated symbols * Adding env var to us shm * adding -e I_MPI_SHM_LMT=shm to the script launcher * Making test compatible with older MAPDL versions * Making test compatible with older MAPDL versions * Removing env var from yaml --- .ci/start_mapdl.sh | 1 + .ci/start_mapdl_ubuntu.sh | 1 + .github/workflows/ci.yml | 10 ++++++++-- tests/test_solution.py | 3 ++- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.ci/start_mapdl.sh b/.ci/start_mapdl.sh index 98232a656a..8d71fa8e02 100755 --- a/.ci/start_mapdl.sh +++ b/.ci/start_mapdl.sh @@ -13,6 +13,7 @@ docker run \ -p $PYMAPDL_PORT:50052 \ -p $PYMAPDL_DB_PORT:50055 \ --shm-size=1gb \ + -e I_MPI_SHM_LMT=shm \ $MAPDL_IMAGE \ -$DISTRIBUTED_MODE -np 2 > log.txt & grep -q 'Server listening on' <(timeout 60 tail -f log.txt) diff --git a/.ci/start_mapdl_ubuntu.sh b/.ci/start_mapdl_ubuntu.sh index 78a59f842d..2165e2b079 100755 --- a/.ci/start_mapdl_ubuntu.sh +++ b/.ci/start_mapdl_ubuntu.sh @@ -14,6 +14,7 @@ docker run \ -p $PYMAPDL_PORT:50052 \ -p $PYMAPDL_DB_PORT:50055 \ --shm-size=1gb \ + -e I_MPI_SHM_LMT=shm \ -w /jobs \ -u=0:0 \ $MAPDL_IMAGE /ansys_inc/v222/ansys/bin/mapdl -grpc -dir /jobs -$DISTRIBUTED_MODE -np 2 > log.txt & diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b67385bd4a..9aec977e02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -3,6 +3,12 @@ name: CI on: pull_request: workflow_dispatch: + inputs: + run_all_tests: + description: 'Run all extended MAPDL build tests' + required: true + type: boolean + push: tags: - "*" @@ -246,14 +252,14 @@ jobs: build-test: name: "Remote: Build and unit testing" runs-on: ubuntu-latest - if: github.ref != 'refs/heads/main' + if: github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' timeout-minutes: 35 strategy: fail-fast: false matrix: mapdl-version: ['v21.1.1', 'v21.2.1', 'v22.1.0', 'v22.2.0', 'v22.2-ubuntu', 'v23.1.0', 'v23.2.0', 'v24.1.0'] extended_testing: - - ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }} + - ${{ github.event_name == 'schedule' || ( github.event_name == 'workflow_dispatch' && inputs.run_all_tests ) || ( github.event_name == 'push' && contains(github.ref, 'refs/tags') ) }} exclude: - extended_testing: false mapdl-version: 'v21.1.1' diff --git a/tests/test_solution.py b/tests/test_solution.py index db146a6501..98fb03c010 100644 --- a/tests/test_solution.py +++ b/tests/test_solution.py @@ -115,4 +115,5 @@ def test_n_cg_iter(mapdl): def test_solution_call(mapdl): mapdl.finish() - assert "MAPDL SOLUTION ROUTINE" in mapdl.solution() + output = mapdl.solution() + assert "MAPDL SOLUTION ROUTINE" in output or "ANSYS SOLUTION ROUTINE" in output