File tree 2 files changed +26
-4
lines changed
2 files changed +26
-4
lines changed Original file line number Diff line number Diff line change 21
21
- name : Install dependencies
22
22
run : dart pub get
23
23
24
- - name : Run tests
25
- run : dart test -n "Daily Exercises" --reporter expanded # Run all tests
24
+ - name : Run tests and capture output
25
+ run : |
26
+ dart test -n "Daily Exercises" --reporter json > test_results.json || true
27
+
28
+ - name : Count passed and failed tests
29
+ run : |
30
+ PASSED_TESTS=$(grep -o '"result":"success"' test_results.json | wc -l)
31
+ FAILED_TESTS=$(grep -o '"result":"failure"' test_results.json | wc -l)
32
+ TOTAL_TESTS=$((PASSED_TESTS + FAILED_TESTS))
33
+
34
+ echo "✅ Passed tests: $PASSED_TESTS" >> $GITHUB_STEP_SUMMARY
35
+ echo "❌ Failed tests: $FAILED_TESTS" >> $GITHUB_STEP_SUMMARY
36
+ echo "📊 Total tests: $TOTAL_TESTS" >> $GITHUB_STEP_SUMMARY
Original file line number Diff line number Diff line change 21
21
- name : Install dependencies
22
22
run : dart pub get
23
23
24
- - name : Run tests
25
- run : dart test -n "Other Exercises" --reporter expanded # Run all tests
24
+ - name : Run tests and capture output
25
+ run : |
26
+ dart test -n "Other Exercises" --reporter json > test_results.json || true
27
+
28
+ - name : Count passed and failed tests
29
+ run : |
30
+ PASSED_TESTS=$(grep -o '"result":"success"' test_results.json | wc -l)
31
+ FAILED_TESTS=$(grep -o '"result":"failure"' test_results.json | wc -l)
32
+ TOTAL_TESTS=$((PASSED_TESTS + FAILED_TESTS))
33
+
34
+ echo "✅ Passed tests: $PASSED_TESTS" >> $GITHUB_STEP_SUMMARY
35
+ echo "❌ Failed tests: $FAILED_TESTS" >> $GITHUB_STEP_SUMMARY
36
+ echo "📊 Total tests: $TOTAL_TESTS" >> $GITHUB_STEP_SUMMARY
You can’t perform that action at this time.
0 commit comments