Compare commits

...

2 Commits

Author SHA1 Message Date
Claude BM
75dd4ee6dc Show feature tags instead of suite name in CI notifications
Lists all feature tags present in the tested files (e.g. genlab,
optimizer, scheduling) and how many tests were not in scope.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 08:27:21 +00:00
Claude BM
7406369b21 Add suite tag and deselected count to CI notifications
Telegram notifications now show which test suite was used (light/heavy)
and how many tests were not in that suite (deselected).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-22 08:14:27 +00:00
2 changed files with 11 additions and 1 deletions

View File

@ -19,6 +19,7 @@ FEATURES="$5" # e.g., "31/31 features verified"
DURATION="$6" # e.g., "12.3s"
ACTOR="$7" # who pushed
REPORT_FILE="$8" # optional HTML failure report path
SUITE_INFO="$9" # e.g., "Suite: light | 202 tests not in suite"
if [ "$STATUS" = "pass" ]; then
ICON="✅"
@ -28,6 +29,7 @@ Tests: ${SUMMARY}
Features: ${FEATURES}
Duration: ${DURATION}
Pushed by: ${ACTOR}
${SUITE_INFO}
@TSHARPSbm_bot"
@ -39,6 +41,7 @@ Tests: ${SUMMARY}
Features: ${FEATURES}
Duration: ${DURATION}
Pushed by: ${ACTOR}
${SUITE_INFO}
${TAG_USERS} — this build needs attention.
@TSHARPSbm_bot"

View File

@ -90,6 +90,7 @@ PASS_COUNT=$(echo "$TEST_OUTPUT" | grep -oP '\d+ passed' | grep -oP '\d+' || ech
FAIL_COUNT=$(echo "$TEST_OUTPUT" | grep -oP '\d+ failed' | grep -oP '\d+' || echo 0)
SKIP_COUNT=$(echo "$TEST_OUTPUT" | grep -oP '\d+ skipped' | grep -oP '\d+' || echo 0)
ERROR_COUNT=$(echo "$TEST_OUTPUT" | grep -oP '\d+ error' | grep -oP '\d+' || echo 0)
DESELECTED_COUNT=$(echo "$TEST_OUTPUT" | grep -oP '\d+ deselected' | grep -oP '\d+' || echo 0)
if [ "$TEST_EXIT" -ne 0 ] && [ "$PASS_COUNT" = "0" ] && [ "$FAIL_COUNT" = "0" ]; then
ERROR_COUNT=1
@ -139,6 +140,12 @@ END_TIME=$(date +%s)
DURATION=$((END_TIME - START_TIME))
SUMMARY="${PASS_COUNT} passed, ${FAIL_COUNT} failed, ${SKIP_COUNT} skipped"
# Collect which feature tags were present in tested files
TAGS_USED=$(grep -rhoP 'pytest\.mark\.\K\w+' "$WORKTREE/backend/tests/test_"*.py 2>/dev/null | \
sort -u | grep -vxE 'skipif|skip|parametrize|fixture|unit|integration|pipeline|e2e|slow|heavy' | \
tr '\n' ', ' | sed 's/,$//')
SUITE_INFO="Tags: ${TAGS_USED} | ${DESELECTED_COUNT} not in scope"
echo ""
echo "========================="
echo "Result: $OVERALL"
@ -261,7 +268,7 @@ fi
# ─── Send Notification ───
bash "$SCRIPT_DIR/ci-notify.sh" \
"$BRANCH" "$COMMIT" "$OVERALL" "$SUMMARY" "$FEATURES_RESULT" "${DURATION}s" "$ACTOR" "$REPORT_FILE"
"$BRANCH" "$COMMIT" "$OVERALL" "$SUMMARY" "$FEATURES_RESULT" "${DURATION}s" "$ACTOR" "$REPORT_FILE" "$SUITE_INFO"
# Release lock
flock -u 200