Files
openhuman/app/scripts/e2e-run-shards.sh
T
+16 2e5b5e7b23 Promote main → release (#5203)
Co-authored-by: YellowSnnowmann <167776381+YellowSnnowmann@users.noreply.github.com>
Co-authored-by: Steven Enamakel <31011319+senamakel@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cyrus Gray <144336577+graycyrus@users.noreply.github.com>
Co-authored-by: Horst1993 <horst.w@gmicloud.ai>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: James Gentes <jgentes@users.noreply.github.com>
Co-authored-by: Sam <samrusani@users.noreply.github.com>
Co-authored-by: Sami Rusani <14844597+samrusani@users.noreply.github.com>
Co-authored-by: oxoxDev <164490987+oxoxDev@users.noreply.github.com>
Co-authored-by: Muhammad Ismail <78064250+myi1@users.noreply.github.com>
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: nb213 <binyangzhu000@gmail.com>
Co-authored-by: binyangzhu000-sudo <224954946+binyangzhu000-sudo@users.noreply.github.com>
Co-authored-by: Steven Enamakel <enamakel@tinyhumans.ai>
Co-authored-by: CodeGhost21 <164498022+CodeGhost21@users.noreply.github.com>
Co-authored-by: sanil-23 <sanil@tinyhumans.ai>
Co-authored-by: M3gA-Mind <elvin@mahadao.com>
Co-authored-by: oxoxDev <oxoxdev@users.noreply.github.com>
Co-authored-by: mysma-9403 <64923976+mysma-9403@users.noreply.github.com>
Co-authored-by: mwakidenis <mwakidenice@gmail.com>
Co-authored-by: NgoQuocViet2001 <123613986+NgoQuocViet2001@users.noreply.github.com>
Co-authored-by: viet.ngo <viet.ngo@sotatek.com>
Co-authored-by: Maciej Myszkiewicz <mmyszkiewicz@bwcoders.com>
2026-07-27 11:49:45 +05:30

85 lines
2.8 KiB
Bash
Executable File

#!/usr/bin/env bash
#
# Local equivalent of the CI shard matrix — runs each suite group as a
# separate fresh WDIO session, matching `.github/workflows/e2e-reusable.yml`'s
# `e2e-linux-full` matrix. Mirroring CI exactly is the only way to reproduce
# CI failures locally: a single shared session that runs all 87 specs hits
# CEF/esbuild instability after ~30 specs.
#
# Usage (from repo root, inside the openhuman_ci Docker container):
# bash app/scripts/e2e-run-shards.sh
#
# Or via docker-compose (from the host):
# docker compose -f e2e/docker-compose.yml run --rm e2e \
# bash -lc "bash app/scripts/e2e-run-shards.sh"
#
# Shards mirror the CI matrix in .github/workflows/e2e-reusable.yml:
# foundation = auth, navigation, system
# chat = chat, skills, journeys
# integrations = providers, webhooks, notifications
# connectors = connectors
# payments = payments
# settings = settings
#
set -uo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
cd "$REPO_ROOT"
# Same matrix as e2e-reusable.yml.
SHARDS=(
"foundation:auth,navigation,system"
"chat:chat,skills,journeys"
"providers:providers,notifications"
"webhooks:webhooks"
"connectors:connectors"
"payments:payments"
"settings:settings"
)
# Allow filtering: `bash e2e-run-shards.sh foundation chat`
if [ "$#" -gt 0 ]; then
WANT=("$@")
FILTERED=()
for shard in "${SHARDS[@]}"; do
name="${shard%%:*}"
for w in "${WANT[@]}"; do
if [ "$name" = "$w" ]; then
FILTERED+=("$shard")
break
fi
done
done
SHARDS=("${FILTERED[@]}")
fi
declare -a RESULTS
overall_status=0
for shard in "${SHARDS[@]}"; do
name="${shard%%:*}"
suites="${shard#*:}"
echo ""
echo "════════════════════════════════════════════════════════════════"
echo " Shard: ${name} (suites: ${suites})"
echo "════════════════════════════════════════════════════════════════"
if bash app/scripts/e2e-run-all-flows.sh --skip-preflight --suite="${suites}"; then
RESULTS+=("${name}: PASS")
else
RESULTS+=("${name}: FAIL")
overall_status=1
fi
done
echo ""
echo "════════════════════════════════════════════════════════════════"
echo " Shard summary"
echo "════════════════════════════════════════════════════════════════"
for r in "${RESULTS[@]}"; do
printf " %s\n" "$r"
done
echo ""
exit "$overall_status"