Skip to content

Commit 33e64ae

Browse files
authored
Update numpy-scipy-c-extension-test.yml
1 parent b9fa6dc commit 33e64ae

1 file changed

Lines changed: 12 additions & 11 deletions

File tree

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

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,9 @@ jobs:
4141
print(f.read())
4242
"
4343
44-
- name: Run NumPy + SciPy Demo Test
45-
id: numpy_scipy_test
44+
- name: Create test runner script
4645
run: |
47-
echo "--- Running Omnipkg Demo for NumPy + SciPy Stress Test (C-Extensions) ---"
48-
49-
# Run the demo with input "3" for NumPy + SciPy test
50-
# Capture all output to a file for validation
51-
python -c "
46+
cat > test_numpy_scipy.py << 'EOF'
5247
import subprocess
5348
import sys
5449
@@ -59,9 +54,9 @@ import omnipkg.demo
5954
import sys
6055
# Monkey patch input to automatically select option 3
6156
original_input = input
62-
def mock_input(prompt=\"\"):
63-
print(prompt + \"3\") # Print the prompt + our choice
64-
return \"3\"
57+
def mock_input(prompt=""):
58+
print(prompt + "3") # Print the prompt + our choice
59+
return "3"
6560
input = mock_input
6661
omnipkg.demo.main()
6762
'''],
@@ -112,7 +107,13 @@ omnipkg.demo.main()
112107

113108
# Exit with the same code as the demo
114109
sys.exit(process.returncode)
115-
" 2>&1
110+
EOF
111+
112+
- name: Run NumPy + SciPy Demo Test
113+
id: numpy_scipy_test
114+
run: |
115+
echo "--- Running Omnipkg Demo for NumPy + SciPy Stress Test (C-Extensions) ---"
116+
python test_numpy_scipy.py
116117
117118
- name: Upload test artifacts
118119
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)