5353
5454 build-test :
5555 runs-on : ubuntu-latest
56- strategy :
57- matrix :
58- package : [core, memory, security, performance, telemetry, workspace]
5956 steps :
6057 - name : Checkout code
6158 uses : actions/checkout@v4
@@ -69,56 +66,43 @@ jobs:
6966 - name : Install dependencies
7067 run : npm ci
7168
72- - name : Build packages
73- run : npm run build:packages
74-
75- - name : Test package build
69+ - name : Test workspace package
7670 run : |
77- PACKAGE="${{ matrix.package }}"
78-
79- case "$PACKAGE" in
80- "workspace")
81- PKG_DIR="."
82- PKG_NAME="@synkra/aios-core"
83- ;;
84- "core")
85- PKG_DIR=".aios-core"
86- PKG_NAME="@synkra/aios-core/core"
87- ;;
88- *)
89- PKG_DIR="$PACKAGE"
90- PKG_NAME="@synkra/aios-core/$PACKAGE"
91- ;;
92- esac
93-
94- echo "Testing package: $PKG_NAME in directory: $PKG_DIR"
95-
71+ echo "Testing workspace package: aios-core"
72+
9673 # Check if package.json exists
97- if [ -f "$PKG_DIR/ package.json" ]; then
74+ if [ -f "package.json" ]; then
9875 echo "✅ package.json exists"
99-
76+
10077 # Check if entry points exist
101- if [ -f "$PKG_DIR/ index.js" ]; then
78+ if [ -f "index.js" ]; then
10279 echo "✅ index.js exists"
10380 else
104- echo "❌ index.js missing"
105- exit 1
81+ echo "ℹ️ index.js not found (CLI-based package)"
10682 fi
107-
83+
10884 # Validate package.json
10985 node -e "
110- const pkg = require('./$PKG_DIR/package.json');
111- if (pkg.name !== '$PKG_NAME') {
112- console.error('❌ Package name mismatch');
113- process.exit(1);
114- }
115- console.log('✅ Package validation passed');
86+ const pkg = require('./package.json');
87+ console.log('✅ Package validation passed:', pkg.name);
11688 "
11789 else
118- echo "❌ package.json not found in $PKG_DIR "
90+ echo "❌ package.json not found"
11991 exit 1
12092 fi
12193
94+ - name : Test installer package
95+ run : |
96+ if [ -d "packages/installer" ]; then
97+ echo "Testing packages/installer"
98+ cd packages/installer
99+ if [ -f "package.json" ]; then
100+ echo "✅ Installer package.json exists"
101+ fi
102+ else
103+ echo "ℹ️ Installer package not found, skipping"
104+ fi
105+
122106 integration-test :
123107 runs-on : ubuntu-latest
124108 needs : [security-audit, build-test]
@@ -135,51 +119,53 @@ jobs:
135119 - name : Install dependencies
136120 run : npm ci
137121
138- - name : Test workspace integration
122+ - name : Test CLI integration
139123 run : |
140- # Test that workspace can be required
124+ # Test that CLI entry point works
141125 node -e "
142126 try {
143- const workspace = require('./index.js');
144- console.log('✅ Workspace module loaded successfully');
145-
146- if (workspace.AIOS) {
147- console.log('✅ AIOS class available');
127+ // Test bin/aios-init.js exists
128+ const fs = require('fs');
129+ if (fs.existsSync('./bin/aios-init.js')) {
130+ console.log('✅ aios-init.js exists');
148131 } else {
149- console.error ('❌ AIOS class not found');
132+ console.log ('❌ aios-init.js not found');
150133 process.exit(1);
151134 }
152-
153- // Test health check
154- const aios = new workspace.AIOS();
155- const health = aios.healthCheck();
156- console.log('✅ Health check passed:', health);
157-
135+
136+ // Test bin/aios.js exists
137+ if (fs.existsSync('./bin/aios.js')) {
138+ console.log('✅ aios.js exists');
139+ } else {
140+ console.log('❌ aios.js not found');
141+ process.exit(1);
142+ }
143+
144+ console.log('✅ CLI integration test passed');
158145 } catch (error) {
159- console.error('❌ Workspace integration test failed:', error.message);
146+ console.error('❌ CLI integration test failed:', error.message);
160147 process.exit(1);
161148 }
162149 "
163150
164- - name : Test individual packages
151+ - name : Test core modules
165152 run : |
166- for pkg in .aios-core memory security performance telemetry; do
167- if [ -d "$pkg" ] && [ -f "$pkg/package.json" ]; then
168- echo "Testing package: $pkg"
169-
170- node -e "
171- try {
172- const pkg = require('./$pkg');
173- console.log('✅ Package $pkg loaded successfully');
174- } catch (error) {
175- console.error('❌ Package $pkg failed to load:', error.message);
176- process.exit(1);
177- }
178- "
153+ # Test core scripts are loadable
154+ for script in health-check greeting-builder agent-parser; do
155+ SCRIPT_PATH=".aios-core/development/scripts/${script}.js"
156+ if [ -f "$SCRIPT_PATH" ]; then
157+ echo "✅ Found: $SCRIPT_PATH"
179158 else
180- echo "Skipping $pkg - not found"
159+ # Check alternative locations
160+ ALT_PATH=".aios-core/core/${script}.js"
161+ if [ -f "$ALT_PATH" ]; then
162+ echo "✅ Found: $ALT_PATH"
163+ else
164+ echo "ℹ️ Script not found: $script (may not be required)"
165+ fi
181166 fi
182167 done
168+ echo "✅ Core modules check completed"
183169
184170 performance-test :
185171 runs-on : ubuntu-latest
@@ -197,15 +183,31 @@ jobs:
197183 - name : Install dependencies
198184 run : npm ci
199185
200- - name : Run performance analysis
186+ - name : Run performance checks
201187 run : |
202- if [ -f "performance/run-critical-path-analysis.js" ]; then
203- cd performance
204- node run-critical-path-analysis.js
205- else
206- echo "Performance analysis not found, skipping"
188+ # Basic performance checks
189+ echo "Running basic performance checks..."
190+
191+ # Check file count in critical directories
192+ AGENT_COUNT=$(find .aios-core/development/agents -name "*.md" | wc -l)
193+ echo "✅ Agent definitions: $AGENT_COUNT"
194+
195+ TASK_COUNT=$(find .aios-core/development/tasks -name "*.md" | wc -l)
196+ echo "✅ Task definitions: $TASK_COUNT"
197+
198+ # Check manifest generation time
199+ START_TIME=$(date +%s%N)
200+ node scripts/generate-install-manifest.js > /dev/null 2>&1
201+ END_TIME=$(date +%s%N)
202+ DURATION=$(( (END_TIME - START_TIME) / 1000000 ))
203+ echo "✅ Manifest generation: ${DURATION}ms"
204+
205+ if [ "$DURATION" -gt 10000 ]; then
206+ echo "⚠️ Manifest generation took longer than expected"
207207 fi
208208
209+ echo "✅ Performance checks completed"
210+
209211 # NOTE: Cross-platform compatibility testing removed (Story 6.1)
210212 # Now handled by ci.yml cross-platform job (only on main branch push)
211213
0 commit comments