Skip to content

Commit cd68ddf

Browse files
PaulDuvallclaude
andcommitted
fix: improve workflow test execution and error handling
- Improve test output capture with tee for better visibility - Separate test execution from report generation failures - Add proper error handling for test report generation - Ensure workflow fails only on actual test failures, not report issues - Enhance logging and feedback for debugging workflow issues 📋 Change summary: * .github/workflows/test.yml: Enhanced test execution and error handling 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent f78fed7 commit cd68ddf

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

.github/workflows/test.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,27 +106,32 @@ jobs:
106106
# Run comprehensive test suite with report generation
107107
echo "▶️ Running comprehensive test suite with report generation..."
108108
109-
# Run tests and capture output for report
110-
if npm test > test-output.log 2>&1; then
109+
# Run tests and capture actual exit code
110+
echo "▶️ Running comprehensive test suite..."
111+
if npm test 2>&1 | tee test-output.log; then
111112
echo "✅ All consolidated tests passed"
112113
TEST_RESULT=0
113114
else
114115
echo "❌ Consolidated tests failed"
115116
TEST_RESULT=1
116117
fi
117118
118-
# Generate comprehensive test report
119+
# Generate comprehensive test report (don't let this fail the build)
119120
echo "📊 Generating test report..."
120-
node scripts/generate-test-report.js || true
121-
122-
# Display test output
123-
cat test-output.log
121+
if node scripts/generate-test-report.js 2>/dev/null; then
122+
echo "✅ Test report generated successfully"
123+
else
124+
echo "⚠️ Test report generation had issues, but continuing..."
125+
fi
124126
125127
cd ..
126128
127-
# Exit with test result
129+
# Exit with actual test result, not report generation result
128130
if [ $TEST_RESULT -ne 0 ]; then
131+
echo "❌ Tests failed - check output above"
129132
exit 1
133+
else
134+
echo "✅ All tests passed"
130135
fi
131136
else
132137
echo "❌ No claude-dev-toolkit test directory found"

0 commit comments

Comments
 (0)