Skip to content

Commit e4ac79c

Browse files
committed
Revert "ci.yml: Try another solution to show failed tests"
This reverts commit 0c2d4f7.
1 parent 940baea commit e4ac79c

File tree

1 file changed

+18
-36
lines changed

1 file changed

+18
-36
lines changed

.github/workflows/ci.yml

Lines changed: 18 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -130,25 +130,16 @@ jobs:
130130
with:
131131
timeout_minutes: 10
132132
max_attempts: 5
133-
command: |
134-
cd ${{ matrix.package }}
135-
echo "🧪 Running ${{ matrix.package }} tests..."
136-
TEST_OUTPUT=$(find src -name '*.test.ts' ! -name '*.integration.test.ts' | sort | xargs -I {} bun test {} 2>&1)
137-
echo "$TEST_OUTPUT"
138-
139-
# Extract and display failed tests
140-
FAILED_TESTS=$(echo "$TEST_OUTPUT" | grep -E "(✗|FAIL|Failed|Error:)" || true)
141-
if [ ! -z "$FAILED_TESTS" ]; then
142-
echo ""
143-
echo "❌ =============== FAILED TESTS SUMMARY ==============="
144-
echo "$FAILED_TESTS"
145-
echo "====================================================="
146-
exit 1
147-
else
148-
echo "✅ All tests passed!"
149-
fi
150-
133+
command: cd ${{ matrix.package }} && find src -name '*.test.ts' ! -name '*.integration.test.ts' | sort | xargs -I {} bun test --reporter=junit --reporter-outfile=test-results.xml {}
151134

135+
- name: Publish Test Results
136+
uses: dorny/test-reporter@v1
137+
if: always()
138+
with:
139+
name: ${{ matrix.package }} Test Results
140+
path: ${{ matrix.package }}/test-results.xml
141+
reporter: java-junit
142+
fail-on-error: true
152143

153144
# - name: Open interactive debug shell
154145
# if: ${{ failure() }}
@@ -208,25 +199,16 @@ jobs:
208199
with:
209200
timeout_minutes: 15
210201
max_attempts: 3
211-
command: |
212-
cd ${{ matrix.package }}
213-
echo "🧪 Running ${{ matrix.package }} integration tests..."
214-
TEST_OUTPUT=$(find src -name '*.integration.test.ts' | sort | xargs -I {} bun test {} 2>&1)
215-
echo "$TEST_OUTPUT"
216-
217-
# Extract and display failed tests
218-
FAILED_TESTS=$(echo "$TEST_OUTPUT" | grep -E "(✗|FAIL|Failed|Error:)" || true)
219-
if [ ! -z "$FAILED_TESTS" ]; then
220-
echo ""
221-
echo "❌ =============== FAILED TESTS SUMMARY ==============="
222-
echo "$FAILED_TESTS"
223-
echo "====================================================="
224-
exit 1
225-
else
226-
echo "✅ All integration tests passed!"
227-
fi
228-
202+
command: cd ${{ matrix.package }} && find src -name '*.integration.test.ts' | sort | xargs -I {} bun test --reporter=junit --reporter-outfile=integration-test-results.xml {}
229203

204+
- name: Publish Integration Test Results
205+
uses: dorny/test-reporter@v1
206+
if: always()
207+
with:
208+
name: ${{ matrix.package }} Integration Test Results
209+
path: ${{ matrix.package }}/integration-test-results.xml
210+
reporter: java-junit
211+
fail-on-error: true
230212

231213
# - name: Open interactive debug shell
232214
# if: ${{ failure() }}

0 commit comments

Comments
 (0)