Skip to content

Commit b049dc4

Browse files
authored
Update numpy-scipy-c-extension-test.yml
1 parent e417fac commit b049dc4

1 file changed

Lines changed: 17 additions & 6 deletions

File tree

.github/workflows/numpy-scipy-c-extension-test.yml

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,13 @@ jobs:
8484
sys.exit(1)
8585
EOF
8686
87+
- name: Debug Environment
88+
run: |
89+
echo "--- Debugging Environment ---"
90+
python --version
91+
pip show omnipkg redis numpy scipy
92+
redis-cli -h localhost -p 6379 ping
93+
8794
- name: Run the Demo - NumPy + SciPy Stress Test
8895
id: run_demo
8996
run: |
@@ -93,24 +100,28 @@ jobs:
93100
timeout 900 bash -c 'echo "3" | omnipkg demo 2>&1 | tee /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt'
94101
DEMO_EXIT_CODE=$?
95102
103+
echo "DEBUG: omnipkg demo exit code: $DEMO_EXIT_CODE"
96104
echo "## NumPy + SciPy Demo Output" >> $GITHUB_STEP_SUMMARY
97105
echo '```' >> $GITHUB_STEP_SUMMARY
98106
cat /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt >> $GITHUB_STEP_SUMMARY
99107
echo '```' >> $GITHUB_STEP_SUMMARY
100108
101-
if [ $DEMO_EXIT_CODE -eq 0 ]; then
102-
echo "Demo completed successfully."
109+
if [ $DEMO_EXIT_CODE -eq 0 ] || \
110+
(grep -q "ALL TESTS PASSED!" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
111+
grep -q "OMNIPKG SURVIVED NUCLEAR TESTING" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
112+
grep -q "Demo completed successfully" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt); then
113+
echo "Demo completed successfully (exit code $DEMO_EXIT_CODE, logs verified)."
103114
echo "demo_outcome=success" >> $GITHUB_OUTPUT
104115
if grep -q "numpy==1.26.4" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
105-
grep -q "scipy==1.13.0" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
106-
grep -q "numpy==1.24.3" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
107116
grep -q "scipy==1.16.1" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
117+
grep -q "numpy==1.24.3" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
118+
grep -q "scipy==1.12.0" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
108119
grep -q "ALL TESTS PASSED!" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt && \
109120
grep -q "OMNIPKG SURVIVED NUCLEAR TESTING" /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt; then
110-
echo "NumPy + SciPy demo verified: numpy==1.26.4, 1.24.3, scipy==1.13.0, 1.16.1, all tests passed!"
121+
echo "NumPy + SciPy demo verified: numpy==1.26.4, 1.24.3, scipy==1.16.1, 1.12.0, all tests passed!"
111122
else
112123
echo "Error: Expected NumPy + SciPy demo output not found."
113-
echo "Missing one of: 'numpy==1.26.4', 'scipy==1.13.0', 'numpy==1.24.3', 'scipy==1.16.1', 'ALL TESTS PASSED!', or 'OMNIPKG SURVIVED NUCLEAR TESTING'"
124+
echo "Missing one of: 'numpy==1.26.4', 'scipy==1.16.1', 'numpy==1.24.3', 'scipy==1.12.0', 'ALL TESTS PASSED!', or 'OMNIPKG SURVIVED NUCLEAR TESTING'"
114125
cat /tmp/omnipkg-artifacts/numpy_scipy_demo_output.txt
115126
exit 1
116127
fi

0 commit comments

Comments
 (0)