Skip to content

Commit dcc4194

Browse files
committed
Phase 2 check
1 parent 0a39a1e commit dcc4194

12 files changed

+458
-269
lines changed

.github/workflows/test-daytona.yml

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -207,62 +207,77 @@ jobs:
207207
if: always()
208208
id: summary
209209
run: |
210+
set +e # Disable exit on error for this step
210211
PASSED=0
211212
FAILED=0
212213
TOTAL_DURATION=0
214+
215+
# Helper function to add duration safely
216+
add_duration() {
217+
local val=$1
218+
if [[ "$val" =~ ^[0-9]+$ ]]; then
219+
TOTAL_DURATION=$((TOTAL_DURATION + val))
220+
fi
221+
}
213222
214-
# Check daytona binary exists
223+
# Iterate through possible steps to check status
224+
# We check explicit passed status, everything else is failure if not skipped (but simplification: if not passed, and supposed to run, it failed)
225+
226+
# Check Test 1
215227
if [ "${{ steps.test1.outputs.status }}" == "passed" ]; then
216228
PASSED=$((PASSED + 1))
217-
else
218-
FAILED=$((FAILED + 1))
229+
elif [ "${{ steps.test1.conclusion }}" == "failure" ] || [ "${{ steps.test1.outcome }}" == "failure" ]; then
230+
FAILED=$((FAILED + 1))
219231
fi
220-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test1.outputs.duration || 0 }}))
232+
add_duration "${{ steps.test1.outputs.duration }}"
221233
222-
# Check daytona version command
234+
# Check Test 2
223235
if [ "${{ steps.test2.outputs.status }}" == "passed" ]; then
224236
PASSED=$((PASSED + 1))
225-
else
226-
FAILED=$((FAILED + 1))
237+
elif [ "${{ steps.test2.conclusion }}" == "failure" ] || [ "${{ steps.test2.outcome }}" == "failure" ]; then
238+
FAILED=$((FAILED + 1))
227239
fi
228-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test2.outputs.duration || 0 }}))
240+
add_duration "${{ steps.test2.outputs.duration }}"
229241
230-
# Check daytona help output
242+
# Check Test 3
231243
if [ "${{ steps.test3.outputs.status }}" == "passed" ]; then
232244
PASSED=$((PASSED + 1))
233-
else
234-
FAILED=$((FAILED + 1))
245+
elif [ "${{ steps.test3.conclusion }}" == "failure" ] || [ "${{ steps.test3.outcome }}" == "failure" ]; then
246+
FAILED=$((FAILED + 1))
235247
fi
236-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test3.outputs.duration || 0 }}))
248+
add_duration "${{ steps.test3.outputs.duration }}"
237249
238-
# Architecture Verification
250+
# Check Test 4 - Architecture
239251
if [ "${{ steps.test4.outputs.status }}" == "passed" ]; then
240252
PASSED=$((PASSED + 1))
241-
else
242-
FAILED=$((FAILED + 1))
253+
elif [ "${{ steps.test4.conclusion }}" == "failure" ] || [ "${{ steps.test4.outcome }}" == "failure" ]; then
254+
FAILED=$((FAILED + 1))
243255
fi
244-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test4.outputs.duration || 0 }}))
256+
add_duration "${{ steps.test4.outputs.duration }}"
245257
246-
# Functional Validation
258+
# Check Test 5 - Functional
247259
if [ "${{ steps.test5.outputs.status }}" == "passed" ]; then
248260
PASSED=$((PASSED + 1))
249-
else
250-
FAILED=$((FAILED + 1))
261+
elif [ "${{ steps.test5.conclusion }}" == "failure" ] || [ "${{ steps.test5.outcome }}" == "failure" ]; then
262+
FAILED=$((FAILED + 1))
251263
fi
252-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test5.outputs.duration || 0 }}))
264+
add_duration "${{ steps.test5.outputs.duration }}"
253265
254266
echo "passed=$PASSED" >> $GITHUB_OUTPUT
255267
echo "failed=$FAILED" >> $GITHUB_OUTPUT
256268
echo "duration=$TOTAL_DURATION" >> $GITHUB_OUTPUT
257-
258-
if [ $FAILED -eq 0 ]; then
269+
270+
# Determine overall status
271+
if [ $FAILED -eq 0 ] && [ $PASSED -gt 0 ]; then
259272
echo "overall_status=success" >> $GITHUB_OUTPUT
260273
echo "badge_status=passing" >> $GITHUB_OUTPUT
261274
else
262275
echo "overall_status=failure" >> $GITHUB_OUTPUT
263276
echo "badge_status=failing" >> $GITHUB_OUTPUT
277+
# Only exit 1 if we want to fail the job when tests fail
264278
exit 1
265279
fi
280+
266281
- name: Generate test results JSON
267282
if: always()
268283
run: |

.github/workflows/test-katsu.yml

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,15 @@ jobs:
6767
sudo apt-get install -y python3-pip
6868
6969
# Use --break-system-packages on newer Ubuntu versions (24.04)
70-
# The package is documented as candig-katsu in some places, but let's try both or the correct one.
71-
if pip install --break-system-packages candig-katsu; then
72-
echo "candig-katsu installed successfully"
70+
# Reverting to 'katsu' as 'candig-katsu' was not found on PyPI.
71+
# We add || true to allow the step to continue so the summary calculation can run.
72+
if pip install --break-system-packages katsu; then
73+
echo "katsu installed successfully"
7374
echo "install_status=success" >> $GITHUB_OUTPUT
7475
else
75-
echo "candig-katsu installation failed"
76+
echo "katsu installation failed"
7677
echo "install_status=failed" >> $GITHUB_OUTPUT
77-
exit 1
78+
# We do NOT exit 1 here to allow the summary step to run and report the failure properly
7879
fi
7980
8081
# ============================================================
@@ -83,7 +84,7 @@ jobs:
8384
- name: Get Katsu version
8485
id: version
8586
run: |
86-
VERSION=$(pip show candig-katsu | grep Version | awk '{print $2}' || echo "unknown")
87+
VERSION=$(pip show katsu | grep Version | awk '{print $2}' || echo "unknown")
8788
echo "version=$VERSION" >> $GITHUB_OUTPUT
8889
echo "Detected Katsu version: $VERSION"
8990
@@ -93,11 +94,11 @@ jobs:
9394
run: |
9495
START_TIME=$(date +%s)
9596
96-
if pip show candig-katsu &> /dev/null; then
97-
echo "✓ candig-katsu package found"
97+
if pip show katsu &> /dev/null; then
98+
echo "✓ katsu package found"
9899
echo "status=passed" >> $GITHUB_OUTPUT
99100
else
100-
echo "✗ candig-katsu package not found"
101+
echo "✗ katsu package not found"
101102
echo "status=failed" >> $GITHUB_OUTPUT
102103
exit 1
103104
fi
@@ -195,62 +196,77 @@ jobs:
195196
if: always()
196197
id: summary
197198
run: |
199+
set +e # Disable exit on error for this step
198200
PASSED=0
199201
FAILED=0
200202
TOTAL_DURATION=0
203+
204+
# Helper function to add duration safely
205+
add_duration() {
206+
local val=$1
207+
if [[ "$val" =~ ^[0-9]+$ ]]; then
208+
TOTAL_DURATION=$((TOTAL_DURATION + val))
209+
fi
210+
}
201211
202-
# Check katsu binary exists
212+
# Iterate through possible steps to check status
213+
# We check explicit passed status, everything else is failure if not skipped (but simplification: if not passed, and supposed to run, it failed)
214+
215+
# Check Test 1
203216
if [ "${{ steps.test1.outputs.status }}" == "passed" ]; then
204217
PASSED=$((PASSED + 1))
205-
else
206-
FAILED=$((FAILED + 1))
218+
elif [ "${{ steps.test1.conclusion }}" == "failure" ] || [ "${{ steps.test1.outcome }}" == "failure" ]; then
219+
FAILED=$((FAILED + 1))
207220
fi
208-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test1.outputs.duration || 0 }}))
221+
add_duration "${{ steps.test1.outputs.duration }}"
209222
210-
# Check katsu version command
223+
# Check Test 2
211224
if [ "${{ steps.test2.outputs.status }}" == "passed" ]; then
212225
PASSED=$((PASSED + 1))
213-
else
214-
FAILED=$((FAILED + 1))
226+
elif [ "${{ steps.test2.conclusion }}" == "failure" ] || [ "${{ steps.test2.outcome }}" == "failure" ]; then
227+
FAILED=$((FAILED + 1))
215228
fi
216-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test2.outputs.duration || 0 }}))
229+
add_duration "${{ steps.test2.outputs.duration }}"
217230
218-
# Check katsu help output
231+
# Check Test 3
219232
if [ "${{ steps.test3.outputs.status }}" == "passed" ]; then
220233
PASSED=$((PASSED + 1))
221-
else
222-
FAILED=$((FAILED + 1))
234+
elif [ "${{ steps.test3.conclusion }}" == "failure" ] || [ "${{ steps.test3.outcome }}" == "failure" ]; then
235+
FAILED=$((FAILED + 1))
223236
fi
224-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test3.outputs.duration || 0 }}))
237+
add_duration "${{ steps.test3.outputs.duration }}"
225238
226-
# Architecture Verification
239+
# Check Test 4 - Architecture
227240
if [ "${{ steps.test4.outputs.status }}" == "passed" ]; then
228241
PASSED=$((PASSED + 1))
229-
else
230-
FAILED=$((FAILED + 1))
242+
elif [ "${{ steps.test4.conclusion }}" == "failure" ] || [ "${{ steps.test4.outcome }}" == "failure" ]; then
243+
FAILED=$((FAILED + 1))
231244
fi
232-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test4.outputs.duration || 0 }}))
245+
add_duration "${{ steps.test4.outputs.duration }}"
233246
234-
# Functional Validation
247+
# Check Test 5 - Functional
235248
if [ "${{ steps.test5.outputs.status }}" == "passed" ]; then
236249
PASSED=$((PASSED + 1))
237-
else
238-
FAILED=$((FAILED + 1))
250+
elif [ "${{ steps.test5.conclusion }}" == "failure" ] || [ "${{ steps.test5.outcome }}" == "failure" ]; then
251+
FAILED=$((FAILED + 1))
239252
fi
240-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test5.outputs.duration || 0 }}))
253+
add_duration "${{ steps.test5.outputs.duration }}"
241254
242255
echo "passed=$PASSED" >> $GITHUB_OUTPUT
243256
echo "failed=$FAILED" >> $GITHUB_OUTPUT
244257
echo "duration=$TOTAL_DURATION" >> $GITHUB_OUTPUT
245-
246-
if [ $FAILED -eq 0 ]; then
258+
259+
# Determine overall status
260+
if [ $FAILED -eq 0 ] && [ $PASSED -gt 0 ]; then
247261
echo "overall_status=success" >> $GITHUB_OUTPUT
248262
echo "badge_status=passing" >> $GITHUB_OUTPUT
249263
else
250264
echo "overall_status=failure" >> $GITHUB_OUTPUT
251265
echo "badge_status=failing" >> $GITHUB_OUTPUT
266+
# Only exit 1 if we want to fail the job when tests fail
252267
exit 1
253268
fi
269+
254270
- name: Generate test results JSON
255271
if: always()
256272
run: |

.github/workflows/test-libaom.yml

Lines changed: 37 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -211,62 +211,77 @@ jobs:
211211
if: always()
212212
id: summary
213213
run: |
214+
set +e # Disable exit on error for this step
214215
PASSED=0
215216
FAILED=0
216217
TOTAL_DURATION=0
218+
219+
# Helper function to add duration safely
220+
add_duration() {
221+
local val=$1
222+
if [[ "$val" =~ ^[0-9]+$ ]]; then
223+
TOTAL_DURATION=$((TOTAL_DURATION + val))
224+
fi
225+
}
217226
218-
# Check libaom binary exists
227+
# Iterate through possible steps to check status
228+
# We check explicit passed status, everything else is failure if not skipped (but simplification: if not passed, and supposed to run, it failed)
229+
230+
# Check Test 1
219231
if [ "${{ steps.test1.outputs.status }}" == "passed" ]; then
220232
PASSED=$((PASSED + 1))
221-
else
222-
FAILED=$((FAILED + 1))
233+
elif [ "${{ steps.test1.conclusion }}" == "failure" ] || [ "${{ steps.test1.outcome }}" == "failure" ]; then
234+
FAILED=$((FAILED + 1))
223235
fi
224-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test1.outputs.duration || 0 }}))
236+
add_duration "${{ steps.test1.outputs.duration }}"
225237
226-
# Check libaom version command
238+
# Check Test 2
227239
if [ "${{ steps.test2.outputs.status }}" == "passed" ]; then
228240
PASSED=$((PASSED + 1))
229-
else
230-
FAILED=$((FAILED + 1))
241+
elif [ "${{ steps.test2.conclusion }}" == "failure" ] || [ "${{ steps.test2.outcome }}" == "failure" ]; then
242+
FAILED=$((FAILED + 1))
231243
fi
232-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test2.outputs.duration || 0 }}))
244+
add_duration "${{ steps.test2.outputs.duration }}"
233245
234-
# Check libaom help output
246+
# Check Test 3
235247
if [ "${{ steps.test3.outputs.status }}" == "passed" ]; then
236248
PASSED=$((PASSED + 1))
237-
else
238-
FAILED=$((FAILED + 1))
249+
elif [ "${{ steps.test3.conclusion }}" == "failure" ] || [ "${{ steps.test3.outcome }}" == "failure" ]; then
250+
FAILED=$((FAILED + 1))
239251
fi
240-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test3.outputs.duration || 0 }}))
252+
add_duration "${{ steps.test3.outputs.duration }}"
241253
242-
# Architecture Verification
254+
# Check Test 4 - Architecture
243255
if [ "${{ steps.test4.outputs.status }}" == "passed" ]; then
244256
PASSED=$((PASSED + 1))
245-
else
246-
FAILED=$((FAILED + 1))
257+
elif [ "${{ steps.test4.conclusion }}" == "failure" ] || [ "${{ steps.test4.outcome }}" == "failure" ]; then
258+
FAILED=$((FAILED + 1))
247259
fi
248-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test4.outputs.duration || 0 }}))
260+
add_duration "${{ steps.test4.outputs.duration }}"
249261
250-
# Functional Validation
262+
# Check Test 5 - Functional
251263
if [ "${{ steps.test5.outputs.status }}" == "passed" ]; then
252264
PASSED=$((PASSED + 1))
253-
else
254-
FAILED=$((FAILED + 1))
265+
elif [ "${{ steps.test5.conclusion }}" == "failure" ] || [ "${{ steps.test5.outcome }}" == "failure" ]; then
266+
FAILED=$((FAILED + 1))
255267
fi
256-
TOTAL_DURATION=$((TOTAL_DURATION + ${{ steps.test5.outputs.duration || 0 }}))
268+
add_duration "${{ steps.test5.outputs.duration }}"
257269
258270
echo "passed=$PASSED" >> $GITHUB_OUTPUT
259271
echo "failed=$FAILED" >> $GITHUB_OUTPUT
260272
echo "duration=$TOTAL_DURATION" >> $GITHUB_OUTPUT
261-
262-
if [ $FAILED -eq 0 ]; then
273+
274+
# Determine overall status
275+
if [ $FAILED -eq 0 ] && [ $PASSED -gt 0 ]; then
263276
echo "overall_status=success" >> $GITHUB_OUTPUT
264277
echo "badge_status=passing" >> $GITHUB_OUTPUT
265278
else
266279
echo "overall_status=failure" >> $GITHUB_OUTPUT
267280
echo "badge_status=failing" >> $GITHUB_OUTPUT
281+
# Only exit 1 if we want to fail the job when tests fail
268282
exit 1
269283
fi
284+
270285
- name: Generate test results JSON
271286
if: always()
272287
run: |

0 commit comments

Comments
 (0)