1- name : " 🎪 Demo Matrix Test (All Demos)"
2-
1+ name : " 🎪 Demo Matrix Test (All Demos + Python Versions)"
32on :
43 push :
54 branches : [ development ]
87 workflow_dispatch :
98
109jobs :
10+ # Quick syntax check across ALL Python versions (fast, no demos)
11+ syntax-check :
12+ runs-on : ubuntu-latest
13+ timeout-minutes : 5
14+ strategy :
15+ fail-fast : false
16+ matrix :
17+ python : ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
18+
19+ name : " Syntax Check - Python ${{ matrix.python }}"
20+
21+ steps :
22+ - uses : actions/checkout@v3
23+
24+ - name : Set up Python ${{ matrix.python }}
25+ uses : actions/setup-python@v4
26+ with :
27+ python-version : ${{ matrix.python }}
28+ allow-prereleases : true
29+
30+ - name : Install omnipkg
31+ run : |
32+ python -m pip install --upgrade pip
33+ pip install -e .
34+
35+ - name : Basic imports (catch syntax errors)
36+ run : |
37+ python -c "import omnipkg"
38+ python -c "from omnipkg import cli"
39+ omnipkg --version
40+ 8pkg --version
41+
42+ - name : Check for Python 3.8+ syntax in 3.7 code
43+ if : matrix.python == '3.7'
44+ run : |
45+ echo "🔍 Scanning for walrus operator..."
46+ ! grep -r " := " src/omnipkg --include="*.py" || {
47+ echo "❌ ERROR: Found walrus operator (:=) which breaks Python 3.7"
48+ exit 1
49+ }
50+
51+ # Full demo suite on key Python versions
1152 demo-matrix :
53+ needs : syntax-check
1254 runs-on : ubuntu-latest
1355 timeout-minutes : 15
1456 strategy :
15- fail-fast : false # Run all demos even if one fails
57+ fail-fast : false
1658 matrix :
59+ python : ['3.7', '3.11', '3.14'] # Min, stable, bleeding-edge
1760 demo : [
1861 {num: 1, name: "Rich Module Switching"},
1962 {num: 2, name: "UV Binary Switching"},
@@ -27,15 +70,16 @@ jobs:
2770 {num: 10, name: "CLI Healing"}
2871 ]
2972
30- name : " Demo ${{ matrix.demo.num }}: ${{ matrix.demo.name }}"
73+ name : " Demo ${{ matrix.demo.num }} - Py ${{ matrix.python }}"
3174
3275 steps :
3376 - uses : actions/checkout@v3
3477
35- - name : Set up Python 3.11
78+ - name : Set up Python ${{ matrix.python }}
3679 uses : actions/setup-python@v4
3780 with :
38- python-version : ' 3.11'
81+ python-version : ${{ matrix.python }}
82+ allow-prereleases : true
3983
4084 - name : Install omnipkg
4185 run : |
@@ -68,17 +112,18 @@ jobs:
68112 run : |
69113 8pkg daemon stop || true
70114
71- # Individual chaos scenarios (for pinpointing issues)
72- # NOTE: Cannot run all 23 scenarios at once - runs out of disk space!
115+ # Chaos scenarios - only on Python 3.11 (they already cover edge cases)
73116 chaos-individual :
117+ needs : syntax-check
74118 runs-on : ubuntu-latest
75119 timeout-minutes : 10
76120 strategy :
77121 fail-fast : false
78122 matrix :
79- scenario : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
123+ scenario : [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23]
124+ # REMOVED 13 - runs out of space on GitHub runners
80125
81- name : " Chaos Scenario ${{ matrix.scenario }}"
126+ name : " Chaos ${{ matrix.scenario }} - Py3.11 "
82127
83128 steps :
84129 - uses : actions/checkout@v3
99144 - name : Run Chaos Scenario ${{ matrix.scenario }}
100145 timeout-minutes : 8
101146 run : |
102- # Select demo 11, wait for menu, then select specific scenario
103147 (echo "11"; sleep 2; echo "${{ matrix.scenario }}") | 8pkg demo
104148 continue-on-error : true
105149
@@ -115,5 +159,40 @@ jobs:
115159 if : always()
116160 run : |
117161 8pkg daemon stop
118- # Clean up any leftover processes
119162 pkill -f "omnipkg" || true
163+
164+ # Test 13 in Podman (self-hosted or workflow_dispatch only)
165+ chaos-13-podman :
166+ if : github.event_name == 'workflow_dispatch'
167+ runs-on : [self-hosted, linux, x64]
168+ timeout-minutes : 15
169+
170+ name : " Chaos 13 (Podman - Needs Space)"
171+
172+ steps :
173+ - uses : actions/checkout@v3
174+
175+ - name : Run in Podman with more space
176+ run : |
177+ podman run --rm -v $(pwd):/workspace:Z \
178+ --platform linux/amd64 \
179+ python:3.11-slim /bin/bash -c "
180+ cd /workspace
181+ pip install -e .
182+ 8pkg daemon start
183+ sleep 3
184+ (echo '11'; sleep 2; echo '13') | 8pkg demo
185+ 8pkg daemon stop
186+ "
187+
188+ # PyPI release gate - requires all demos to pass on key Python versions
189+ pypi-gate :
190+ name : " ✅ PyPI Release Gate"
191+ needs : [syntax-check, demo-matrix, chaos-individual]
192+ runs-on : ubuntu-latest
193+ if : startsWith(github.ref, 'refs/tags/')
194+ steps :
195+ - name : All tests passed
196+ run : |
197+ echo "🎉 All demos passed on Python 3.7, 3.11, 3.14!"
198+ echo "✅ Ready for PyPI release"
0 commit comments