2424 PACKAGE_NAME : ' ansys-mapdl-core'
2525 PACKAGE_NAMESPACE : ' ansys.mapdl.core'
2626 DOCUMENTATION_CNAME : ' mapdl.docs.pyansys.com'
27- LATEST_VERSION : " 242 "
27+ LATEST_VERSION : " 252 "
2828 MAPDL_IMAGE_VERSION_DOCS_BUILD : v24.2-ubuntu-student
2929 MEILISEARCH_API_KEY : ${{ secrets.MEILISEARCH_API_KEY }}
3030 MEILISEARCH_PUBLIC_API_KEY : ${{ secrets.MEILISEARCH_PUBLIC_API_KEY }}
3333 DPF_PORT : 21004
3434 MAPDL_PACKAGE : ghcr.io/ansys/mapdl
3535 ON_CI : True
36- 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'
36+ 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=180'
37+
3738
3839 BUILD_CHEATSHEET : True
40+ PYMAPDL_DEBUG_TESTING : True
3941
4042 # Following env vars when changed will "reset" the mentioned cache,
4143 # by changing the cache file name. It is rendered as ...-v%RESET_XXX%-...
@@ -62,7 +64,6 @@ permissions:
6264
6365jobs :
6466
65-
6667 update-changelog :
6768 name : " Update CHANGELOG (on release)"
6869 if : github.event_name == 'push' && contains(github.ref, 'refs/tags')
@@ -128,6 +129,7 @@ jobs:
128129 library-name : ${{ env.PACKAGE_NAME }}
129130 operating-system : ${{ matrix.os }}
130131 python-version : ${{ matrix.python-version }}
132+ whitelist-license-check : " attrs" # This has MIT license but fails the check
131133
132134 - name : " Importing library"
133135 run : |
@@ -149,6 +151,8 @@ jobs:
149151 python-package-name : ${{ env.PACKAGE_NAME }}
150152 dev-mode : ${{ github.ref != 'refs/heads/main' }}
151153 upload-reports : True
154+ hide-log : false
155+
152156
153157 docs-build :
154158 name : " Build documentation"
@@ -336,7 +340,7 @@ jobs:
336340 MAPDL_INSTANCE : MAPDL_0
337341 LOG_NAMES : logs-build-docs
338342 run : |
339- .ci/collect_mapdl_logs .sh
343+ .ci/collect_mapdl_logs_remote .sh
340344
341345 - name : " Upload logs to GitHub"
342346 if : always()
@@ -351,7 +355,7 @@ jobs:
351355 MAPDL_INSTANCE : MAPDL_0
352356 LOG_NAMES : logs-build-docs
353357 run : |
354- .ci/display_logs .sh
358+ .ci/display_logs_remote .sh
355359
356360 build-test-remote-matrix :
357361 name : " Build remote test matrix"
@@ -576,7 +580,7 @@ jobs:
576580 MAPDL_INSTANCE : MAPDL_0
577581 LOG_NAMES : logs-remote-${{ matrix.mapdl-version }}
578582 run : |
579- .ci/collect_mapdl_logs .sh
583+ .ci/collect_mapdl_logs_remote .sh
580584
581585 - name : " Upload logs to GitHub"
582586 if : always()
@@ -591,7 +595,7 @@ jobs:
591595 MAPDL_INSTANCE : MAPDL_0
592596 LOG_NAMES : logs-remote-${{ matrix.mapdl-version }}
593597 run : |
594- .ci/display_logs .sh
598+ .ci/display_logs_remote .sh
595599
596600 build-test-local-minimal-matrix :
597601 name : " Build test matrix for minimal and local"
@@ -615,7 +619,7 @@ jobs:
615619 - id : set-matrix
616620 env :
617621 ONLY_UBUNTU : true
618- LIMIT_VERSIONS : 3
622+ LIMIT_VERSIONS : 2
619623 ON_SCHEDULE : ${{ github.event_name == 'schedule' }}
620624 ON_WORKFLOW_DISPATCH : ${{ github.event_name == 'workflow_dispatch' }}
621625 RUN_ALL_TEST : ${{ inputs.run_all_tests }}
@@ -713,6 +717,27 @@ jobs:
713717 --reset_only_failed --add_missing_images \
714718 --cov-report=xml:${{ matrix.mapdl-version }}-local.xml
715719
720+ - name : " Collect logs on failure"
721+ if : always()
722+ env :
723+ LOG_NAMES : logs-local-${{ matrix.mapdl-version }}
724+ run : |
725+ .ci/collect_mapdl_logs_locals.sh
726+
727+ - name : " Upload logs to GitHub"
728+ if : always()
729+ uses : actions/upload-artifact@master
730+ with :
731+ name : logs-local-${{ matrix.mapdl-version }}.tgz
732+ path : ./logs-local-${{ matrix.mapdl-version }}.tgz
733+
734+ - name : " Display files structure"
735+ if : always()
736+ env :
737+ LOG_NAMES : logs-local-${{ matrix.mapdl-version }}
738+ run : |
739+ .ci/display_logs_locals.sh
740+
716741 - name : " Adding the directory as safe directory for later step"
717742 run : |
718743 git config --global --add safe.directory $GITHUB_WORKSPACE
@@ -821,7 +846,7 @@ jobs:
821846
822847 - name : " Unit testing requirements installation"
823848 run : |
824- python -m pip install pytest pytest-rerunfailures pytest-cov pytest-random-order
849+ python -m pip install -r .ci/requirements_minimal.txt
825850
826851 - name : " Unit testing"
827852 env :
@@ -850,6 +875,27 @@ jobs:
850875 ${{ env.PYTEST_ARGUMENTS }} \
851876 --cov-report=xml:${{ matrix.mapdl-version }}-minimal.xml
852877
878+ - name : " Collect logs on failure"
879+ if : always()
880+ env :
881+ LOG_NAMES : logs-minimal-${{ matrix.mapdl-version }}
882+ run : |
883+ .ci/collect_mapdl_logs_locals.sh
884+
885+ - name : " Upload logs to GitHub"
886+ if : always()
887+ uses : actions/upload-artifact@master
888+ with :
889+ name : logs-minimal-${{ matrix.mapdl-version }}.tgz
890+ path : ./logs-minimal-${{ matrix.mapdl-version }}.tgz
891+
892+ - name : " Display files structure"
893+ if : always()
894+ env :
895+ LOG_NAMES : logs-minimal-${{ matrix.mapdl-version }}
896+ run : |
897+ .ci/display_logs_locals.sh
898+
853899 - uses : codecov/codecov-action@v5
854900 name : " Upload coverage to Codecov"
855901 with :
@@ -865,6 +911,135 @@ jobs:
865911 path : ./${{ matrix.mapdl-version }}-minimal.xml
866912
867913
914+ build-test-ubuntu-console :
915+ name : " Local-min-console: ${{ matrix.mapdl-version }}"
916+ runs-on : ubuntu-latest
917+ if : github.ref != 'refs/heads/main' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'
918+ needs : [smoke-tests, build-test-local-minimal-matrix]
919+ timeout-minutes : 75
920+ strategy :
921+ fail-fast : false
922+ matrix : ${{fromJson(needs.build-test-local-minimal-matrix.outputs.matrix)}}
923+ container :
924+ image : ghcr.io/ansys/mapdl:${{ matrix.mapdl-version }}
925+ options : -u=0:0 --oom-kill-disable --memory=6656MB --memory-swap=16896MB --shm-size=1gb --entrypoint /bin/bash
926+ credentials :
927+ username : ${{ github.actor }}
928+ password : ${{ secrets.GITHUB_TOKEN }}
929+ env :
930+ ON_LOCAL : true
931+ ON_UBUNTU : true
932+ TESTING_MINIMAL : true
933+ ON_CONSOLE : true
934+
935+ steps :
936+ - name : " Install Git and checkout project"
937+ 938+ with :
939+ repository : ${{ github.event.pull_request.head.repo.full_name }}
940+ ref : ${{ github.event.pull_request.head.ref }}
941+
942+ - name : " Get if running student version"
943+ id : student_check
944+ run : |
945+ if [[ "${{ matrix.mapdl-version }}" == *"student"* ]];
946+ then export ON_STUDENT=true; export TAG_STUDENT="student";
947+ else export ON_STUDENT=false; export TAG_STUDENT="non-student";
948+ fi
949+
950+ echo "ON_STUDENT: $ON_STUDENT"
951+ echo "TAG_STUDENT: $TAG_STUDENT"
952+ echo "ON_STUDENT=$(echo $ON_STUDENT)" >> $GITHUB_OUTPUT
953+ echo "TAG_STUDENT=$(echo $TAG_STUDENT)" >> $GITHUB_OUTPUT
954+
955+ - name : " Installing missing package"
956+ run : |
957+ sudo apt-get update
958+ sudo apt-get install -y libgomp1
959+
960+ - name : " Setup Python"
961+ uses : actions/setup-python@v5
962+ with :
963+ python-version : ${{ env.MAIN_PYTHON_VERSION }}
964+
965+ - name : " Checking Python"
966+ run : |
967+ python --version
968+ python -m pip install --upgrade pip
969+
970+ - name : " Install ansys-mapdl-core"
971+ run : |
972+ python -m pip install . --no-deps
973+ python -m pip install -r minimum_requirements.txt
974+ python -c "from ansys.mapdl import core as pymapdl; print('Import successfull')"
975+
976+ - name : " Unit testing requirements installation"
977+ run : |
978+ python -m pip install -r .ci/requirements_minimal.txt
979+
980+ - name : " Unit testing"
981+ env :
982+ ANSYSLMD_LICENSE_FILE : " 1055@${{ secrets.LICENSE_SERVER }}"
983+ ON_STUDENT : ${{ steps.student_check.outputs.ON_STUDENT }}
984+ run : |
985+ echo "ON_UBUNTU: $ON_UBUNTU"
986+ echo "ON_STUDENT: $ON_STUDENT"
987+
988+ # Because there is no 'ansys-tools-path' we need to input the
989+ # executable path with the env var: PYMAPDL_MAPDL_EXEC.
990+
991+ if [[ "${{ matrix.mapdl-version }}" == *"latest-ubuntu"* ]] ; then
992+ version=${{ env.LATEST_VERSION }}
993+ else
994+ version=$(echo "${{ matrix.mapdl-version }}" | head -c 5 | tail -c 4 | tr -d '.')
995+ fi;
996+
997+ echo "Version: $version"
998+
999+ export PYMAPDL_MAPDL_EXEC=/ansys_inc/v"$version"/ansys/bin/ansys"$version"
1000+ echo "$PYMAPDL_MAPDL_EXEC"
1001+
1002+ unset PYMAPDL_START_INSTANCE
1003+ pytest -k "console" \
1004+ ${{ env.PYTEST_ARGUMENTS }} \
1005+ --cov-report=xml:${{ matrix.mapdl-version }}-minimal-console.xml
1006+
1007+ - name : " Collect logs on failure"
1008+ if : always()
1009+ env :
1010+ LOG_NAMES : logs-minimal-console-${{ matrix.mapdl-version }}
1011+ run : |
1012+ .ci/collect_mapdl_logs_locals.sh
1013+
1014+ - name : " Upload logs to GitHub"
1015+ if : always()
1016+ uses : actions/upload-artifact@master
1017+ with :
1018+ name : logs-minimal-console-${{ matrix.mapdl-version }}.tgz
1019+ path : ./logs-minimal-console-${{ matrix.mapdl-version }}.tgz
1020+
1021+ - name : " Display files structure"
1022+ if : always()
1023+ env :
1024+ LOG_NAMES : logs-minimal-console-${{ matrix.mapdl-version }}
1025+ run : |
1026+ .ci/display_logs_locals.sh
1027+
1028+ - uses : codecov/codecov-action@v5
1029+ name : " Upload coverage to Codecov"
1030+ with :
1031+ token : ${{ secrets.CODECOV_TOKEN }} # required
1032+ root_dir : ${{ github.workspace }}
1033+ name : ${{ matrix.mapdl-version }}-minimal-console.xml
1034+ flags : ubuntu,local,${{ matrix.mapdl-version }},minimal,console,${{ steps.student_check.outputs.TAG_STUDENT }},dmp
1035+
1036+ - name : " Upload coverage artifacts"
1037+ uses : actions/upload-artifact@v4
1038+ with :
1039+ name : ${{ matrix.mapdl-version }}-minimal-console.xml
1040+ path : ./${{ matrix.mapdl-version }}-minimal-console.xml
1041+
1042+
8681043 test-windows :
8691044 # Skipped
8701045 if : github.repository == ''
0 commit comments