Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: adding-profiling-to-unit-tests #3676

Merged
merged 8 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .ci/collect_mapdl_logs_locals.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@

mkdir "$LOG_NAMES" && echo "Successfully generated directory $LOG_NAMES"

echo "Copying the log files..."
cp *.log ./"$LOG_NAMES"/ || echo "No log files could be found"
cp *apdl.out ./"$LOG_NAMES"/ || echo "No APDL log files could be found"
cp *pymapdl.apdl ./"$LOG_NAMES"/ || echo "No PYMAPDL APDL log files could be found"

echo "Copying the profiling files..."
cp -r prof ./"$LOG_NAMES"/prof || echo "No profile files could be found"


ls -la ./"$LOG_NAMES"

Expand Down
3 changes: 3 additions & 0 deletions .ci/collect_mapdl_logs_remote.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,9 @@ echo "Copying docker launch log..."
cp mapdl_launch_0.log ./"$LOG_NAMES"/mapdl_launch_0.log || echo "MAPDL launch docker log not found."
cp mapdl_launch_1.log ./"$LOG_NAMES"/mapdl_launch_1.log || echo "MAPDL launch docker log not found."

echo "Copying the profiling files..."
cp -r prof ./"$LOG_NAMES"/prof || echo "No profile files could be found"

echo "Collecting file structure..."
ls -R > ./"$LOG_NAMES"/files_structure.txt || echo "Failed to copy file structure to a file"

Expand Down
1 change: 1 addition & 0 deletions .ci/requirements_minimal.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
pyfakefs==5.7.2
pytest-cov==6.0.0
pytest-profiling==1.8.1
pytest-random-order==1.1.1
pytest-rerunfailures==15.0
pytest-timeout==2.3.1
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 --timeout=180'
PYTEST_ARGUMENTS: '-vvv -rxXsa --color=yes --durations=30 --random-order --random-order-bucket=class --maxfail=10 --reruns 3 --reruns-delay 4 --cov=ansys.mapdl.core --cov-report=html --timeout=180 --profile-svg --profile'

BUILD_CHEATSHEET: True
PYMAPDL_DEBUG_TESTING: True
Expand Down Expand Up @@ -513,7 +513,7 @@ jobs:
- name: "Install os packages"
run: |
sudo apt update
sudo apt install libgl1-mesa-glx xvfb
sudo apt install libgl1-mesa-glx xvfb graphviz

- name: "Test virtual framebuffer"
run: |
Expand Down Expand Up @@ -685,7 +685,7 @@ jobs:
- name: "Install OS packages"
run: |
apt update
apt install -y libgl1-mesa-glx xvfb libgomp1
apt install -y libgl1-mesa-glx xvfb libgomp1 graphviz

- name: "Test virtual framebuffer"
run: |
Expand Down Expand Up @@ -827,7 +827,7 @@ jobs:
- name: "Installing missing package"
run: |
sudo apt-get update
sudo apt-get install -y libgomp1
sudo apt-get install -y libgomp1 graphviz

- name: "Setup Python"
uses: actions/setup-python@v5
Expand Down Expand Up @@ -957,7 +957,7 @@ jobs:
- name: "Installing missing package"
run: |
sudo apt-get update
sudo apt-get install -y libgomp1
sudo apt-get install -y libgomp1 graphviz

- name: "Setup Python"
uses: actions/setup-python@v5
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ docker/mapdl/v212
docker/mapdl/_old
docker/mapdl/*.sh


# temp testing
tmp.out

Expand All @@ -101,3 +100,6 @@ doc/source/sg_execution_times.rst
*prin-stresses.html
doc/webserver.log
doc/webserver.pid

# Profiling
prof
1 change: 1 addition & 0 deletions doc/changelog.d/3676.dependencies.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ci: adding-profiling-to-unit-tests
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ tests = [
"pyfakefs==5.7.4",
"pyiges[full]==0.3.1",
"pytest-cov==6.0.0",
"pytest-profiling==1.8.1",
"pytest-pyvista==0.1.9",
"pytest-random-order==1.1.1",
"pytest-rerunfailures==15.0",
Expand Down
1 change: 0 additions & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
# Setting testing environment
# ---------------------------
#

DEBUG_TESTING = debug_testing()
TESTING_MINIMAL = testing_minimal()

Expand Down
Loading