@@ -43,15 +43,30 @@ jobs:
4343 mhkit.install();
4444 startup-options : -noFigureWindows
4545
46+ - name : Configure MATLAB Python Environment for Health Check
47+ shell : bash -l {0}
48+ run : |
49+ # Get Python executable from mhkit-matlab-env
50+ PYTHON_PATH=$(conda run -n mhkit-matlab-env python -c "import sys; print(sys.executable)")
51+ echo "Python path: $PYTHON_PATH"
52+
53+ # Create health check script with Python configuration
54+ cat > health_check.m << EOF
55+ addpath(genpath('mhkit'));
56+ pyenv(Version='$PYTHON_PATH', ExecutionMode='OutOfProcess');
57+ success = mhkit.check_health();
58+ if ~success
59+ error('MHKiT health check failed - installation has issues');
60+ end
61+ EOF
62+
63+ echo "Health check script content:"
64+ cat health_check.m
65+
4666 - name : Validate Installation Health
4767 uses : matlab-actions/run-command@v2
4868 with :
49- command : |
50- addpath(genpath('mhkit'));
51- success = mhkit.check_health();
52- if ~success
53- error('MHKiT health check failed - installation has issues');
54- end
69+ command : health_check
5570 startup-options : -noFigureWindows
5671
5772 - name : Add MATLAB test commands
@@ -153,15 +168,30 @@ jobs:
153168 mhkit.install();
154169 startup-options : -noFigureWindows
155170
171+ - name : Configure MATLAB Python Environment for Health Check
172+ shell : bash -l {0}
173+ run : |
174+ # Get Python executable from mhkit-matlab-env
175+ PYTHON_PATH=$(conda run -n mhkit-matlab-env python -c "import sys; print(sys.executable)")
176+ echo "Python path: $PYTHON_PATH"
177+
178+ # Create health check script with Python configuration
179+ cat > health_check.m << EOF
180+ addpath(genpath('mhkit'));
181+ pyenv(Version='$PYTHON_PATH', ExecutionMode='OutOfProcess');
182+ success = mhkit.check_health();
183+ if ~success
184+ error('MHKiT health check failed - installation has issues');
185+ end
186+ EOF
187+
188+ echo "Health check script content:"
189+ cat health_check.m
190+
156191 - name : Validate Installation Health
157192 uses : matlab-actions/run-command@v2
158193 with :
159- command : |
160- addpath(genpath('mhkit'));
161- success = mhkit.check_health();
162- if ~success
163- error('MHKiT health check failed - installation has issues');
164- end
194+ command : health_check
165195 startup-options : -noFigureWindows
166196
167197 - name : Add MATLAB test commands
@@ -184,4 +214,4 @@ jobs:
184214 uses : matlab-actions/run-command@v2
185215 with :
186216 command : run
187- startup-options : -noFigureWindows
217+ startup-options : -noFigureWindows
0 commit comments