8686 echo " ℹ️ Claude Code setup tests skipped (not available in CI)"
8787 echo "✅ All CI-compatible integration tests passed"
8888
89- - name : Run consolidated test suites
89+ - name : Run consolidated test suites and generate report
9090 run : |
9191 echo "🧪 Running Consolidated Test Suites (converted from Python to JavaScript)"
9292 echo "ℹ️ Tests migrated from specs/tests/ to claude-dev-toolkit/tests/ for NPM package consistency"
@@ -100,21 +100,50 @@ jobs:
100100 echo "Installing NPM dependencies..."
101101 npm install --silent
102102
103- # Run comprehensive test suite
104- echo "▶️ Running comprehensive test suite..."
105- if npm test; then
103+ # Make test report generator executable
104+ chmod +x scripts/generate-test-report.js
105+
106+ # Run comprehensive test suite with report generation
107+ echo "▶️ Running comprehensive test suite with report generation..."
108+
109+ # Run tests and capture output for report
110+ if npm test > test-output.log 2>&1; then
106111 echo "✅ All consolidated tests passed"
112+ TEST_RESULT=0
107113 else
108114 echo "❌ Consolidated tests failed"
109- exit 1
115+ TEST_RESULT= 1
110116 fi
111117
118+ # Generate comprehensive test report
119+ echo "📊 Generating test report..."
120+ node scripts/generate-test-report.js || true
121+
122+ # Display test output
123+ cat test-output.log
124+
112125 cd ..
126+
127+ # Exit with test result
128+ if [ $TEST_RESULT -ne 0 ]; then
129+ exit 1
130+ fi
113131 else
114132 echo "❌ No claude-dev-toolkit test directory found"
115133 exit 1
116134 fi
117135
136+ - name : Upload test reports
137+ if : always()
138+ uses : actions/upload-artifact@v4
139+ with :
140+ name : test-reports
141+ path : |
142+ claude-dev-toolkit/test-reports/latest-report.html
143+ claude-dev-toolkit/test-reports/latest-report.md
144+ claude-dev-toolkit/test-reports/latest-report.json
145+ retention-days : 30
146+
118147 - name : Run additional NPM package validations
119148 run : |
120149 echo "🧪 Running Additional NPM Package Validations"
@@ -130,84 +159,12 @@ jobs:
130159 echo "Ensuring NPM dependencies..."
131160 npm install --silent
132161
133- # Run all 10 individual test suites for detailed reporting
134- echo "▶️ Running REQ-007 Interactive Setup Wizard tests..."
135- if npm run test:req007; then
136- echo "✅ REQ-007 Interactive Setup Wizard: PASSED"
137- else
138- echo "❌ REQ-007 Interactive Setup Wizard: FAILED"
139- exit 1
140- fi
141-
142- echo "▶️ Running REQ-009 Configuration Template Application tests..."
143- if npm run test:req009; then
144- echo "✅ REQ-009 Configuration Template Application: PASSED"
145- else
146- echo "❌ REQ-009 Configuration Template Application: FAILED"
147- exit 1
148- fi
149-
150- echo "▶️ Running REQ-018 Security Hook Installation tests..."
151- if npm run test:req018; then
152- echo "✅ REQ-018 Security Hook Installation: PASSED"
153- else
154- echo "❌ REQ-018 Security Hook Installation: FAILED"
155- exit 1
156- fi
157-
158- echo "▶️ Running Command Validation tests..."
159- if npm run test:commands; then
160- echo "✅ Command Validation: PASSED"
161- else
162- echo "❌ Command Validation: FAILED"
163- exit 1
164- fi
165-
166- echo "▶️ Running Core Workflow Commands tests..."
167- if npm run test:workflow; then
168- echo "✅ Core Workflow Commands: PASSED"
169- else
170- echo "❌ Core Workflow Commands: FAILED"
171- exit 1
172- fi
173-
174- echo "▶️ Running Security Commands tests..."
175- if npm run test:security; then
176- echo "✅ Security Commands: PASSED"
177- else
178- echo "❌ Security Commands: FAILED"
179- exit 1
180- fi
181-
182- echo "▶️ Running Quality Commands tests..."
183- if npm run test:quality; then
184- echo "✅ Quality Commands: PASSED"
185- else
186- echo "❌ Quality Commands: FAILED"
187- exit 1
188- fi
189-
190- echo "▶️ Running Git Commands tests..."
191- if npm run test:git; then
192- echo "✅ Git Commands: PASSED"
193- else
194- echo "❌ Git Commands: FAILED"
195- exit 1
196- fi
197-
198- echo "▶️ Running User Experience tests..."
199- if npm run test:ux; then
200- echo "✅ User Experience: PASSED"
201- else
202- echo "❌ User Experience: FAILED"
203- exit 1
204- fi
205-
206- echo "▶️ Running Validation System tests..."
207- if npm run test:validation; then
208- echo "✅ Validation System: PASSED"
162+ # Run dynamic test discovery - automatically finds and runs all tests
163+ echo "▶️ Running Dynamic Test Suite (auto-discovers all tests)..."
164+ if npm test; then
165+ echo "✅ All Tests: PASSED (via dynamic discovery)"
209166 else
210- echo "❌ Validation System : FAILED"
167+ echo "❌ Dynamic Test Suite : FAILED"
211168 exit 1
212169 fi
213170
@@ -471,24 +428,24 @@ jobs:
471428 echo "📊 Test Summary:"
472429 echo "✅ Debug sub-agent tests (Python)"
473430 echo "✅ Command validation (JavaScript)"
474- echo "✅ Comprehensive test suite (JavaScript - all 10 suites)"
475- echo "✅ REQ-007 Interactive Setup Wizard"
476- echo "✅ REQ-009 Configuration Template Application"
477- echo "✅ REQ-018 Security Hook Installation"
478- echo "✅ Command Validation"
479- echo "✅ Core Workflow Commands"
480- echo "✅ Security Commands"
481- echo "✅ Quality Commands"
482- echo "✅ Git Commands"
483- echo "✅ User Experience"
484- echo "✅ Validation System"
431+ echo "✅ Dynamic test suite (auto-discovers all tests)"
432+ echo "✅ REQ tests (requirements validation)"
433+ echo "✅ Individual test suites (modular testing)"
434+ echo "✅ Comprehensive test suite (integrated testing)"
435+ echo "✅ Test report generation (HTML/MD/JSON)"
485436 echo "✅ UX/Manual Test Suite (user experience validation)"
486437 echo "✅ Automated badge updates"
487438 echo "✅ Package validation"
488439 echo "✅ JSON template validation"
489440 echo "✅ Repository structure checks"
490441 echo "✅ Command file structure validation"
491442 echo ""
443+ echo "📄 Test Reports Generated:"
444+ echo "• HTML Report: Available in test-reports artifact"
445+ echo "• Markdown Report: Available in test-reports artifact"
446+ echo "• JSON Report: Available in test-reports artifact"
447+ echo "• GitHub Summary: View in Actions run summary"
448+ echo ""
492449 echo "🚀 Repository is ready for deployment!"
493450 echo "📦 NPM package (claude-dev-toolkit) ready for distribution!"
494451 echo "🔄 Migration to JavaScript test suite completed!"
0 commit comments