Skip to content

Commit 0fee35e

Browse files
authored
Adding logic to stop the container and restart it to retrieve the files. (#1430)
* Adding logic to stop the container and restart it to retrieve the files. * Adding a killing test * Adding max failures * improving killing test. * Always stopping container. * Moving killing test to the first. * adding forgotten os * Avoiding lock check (useful for restarting) * Removing the restarting thing, and trusting docker restarting flag and ANS_LOCK env var * forcing mapdl to stop and start. * removing killing test for final deployment * Adding logic to build docs. * Adding logic to nightlies. * testing again without the restarting block * Removing killing test and stop-restart changes. The ans_lock was more than sufficient. * Fixing unit tests.
1 parent 411af2e commit 0fee35e

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

.ci/start_mapdl.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/bin/bash
22
docker pull $MAPDL_IMAGE
33
docker run \
4-
--restart always \
54
--name mapdl \
65
--restart always \
76
--health-cmd="ps aux | grep \"[/]ansys_inc/.*ansys\.e.*grpc\" -q && echo 0 || echo 1" \
@@ -11,6 +10,7 @@ docker run \
1110
--health-start-period=10s \
1211
-e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER \
1312
-e ANS_DEBUG_CRASH=1 \
13+
-e ANSYS_LOCK="OFF" \
1414
-p $PYMAPDL_PORT:50052 \
1515
-p $PYMAPDL_DB_PORT:50055 \
1616
$MAPDL_IMAGE \

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ jobs:
345345
- name: Unit Testing
346346
run: |
347347
pip install -r requirements/requirements_tests.txt
348-
xvfb-run pytest -v --durations=0 --cov=ansys.mapdl.core --cov-report=xml --cov-report=html
348+
xvfb-run pytest -v --maxfail=10 --durations=0 --cov=ansys.mapdl.core --cov-report=xml --cov-report=html
349349
350350
- uses: codecov/codecov-action@v3
351351
if: matrix.mapdl-version == 'v21.2.1'

.github/workflows/nightly-doc-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
- name: Pull, launch, and validate MAPDL service
5555
run: |
5656
docker pull $MAPDL_IMAGE
57-
docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER -e ANS_DEBUG_CRASH=1 --restart always --name mapdl -p $PYMAPDL_PORT:50052 $MAPDL_IMAGE -smp > log.txt &
57+
docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER -e ANS_DEBUG_CRASH=1 -e ANSYS_LOCK="OFF" --restart always --name mapdl -p $PYMAPDL_PORT:50052 $MAPDL_IMAGE -smp > log.txt &
5858
grep -q 'Server listening on' <(timeout 60 tail -f log.txt)
5959
python -c "from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())"
6060
env:

.github/workflows/nightly-mapdl-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252

5353
- name: Pull image
5454
run: |
55-
docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER -e ANS_DEBUG_CRASH=1 --restart always --name mapdl -p $PYMAPDL_PORT:50052 -p $PYMAPDL_DB_PORT:50055 $MAPDL_IMAGE -smp > log.txt &
55+
docker run -e ANSYSLMD_LICENSE_FILE=1055@$LICENSE_SERVER -e ANS_DEBUG_CRASH=1 -e ANSYS_LOCK="OFF" --restart always --name mapdl -p $PYMAPDL_PORT:50052 -p $PYMAPDL_DB_PORT:50055 $MAPDL_IMAGE -smp > log.txt &
5656
grep -q 'Server listening on' <(timeout 60 tail -f log.txt)
5757
python -c "from ansys.mapdl.core import launch_mapdl; print(launch_mapdl())"
5858
env:

tests/test_grpc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def test_download_project(mapdl, tmpdir):
346346
mapdl.download_project(target_dir=target_dir)
347347
files_extensions = set([each.split(".")[-1] for each in os.listdir(target_dir)])
348348

349-
expected = {"log", "out", "err", "lock"}
349+
expected = {"log", "out", "err"}
350350
assert expected.intersection(files_extensions) == expected
351351

352352

0 commit comments

Comments
 (0)