Making the e2e tests more resiliant for network issues.
Some checks failed
Tests / Build and Push CICD Base Image (push) Successful in 1m5s
Tests / Build and Push CICD Complete Image (push) Successful in 15m21s
Tests / Trailing Whitespace Check (push) Successful in 22m37s
Tests / End of File Check (push) Successful in 59s
Tests / YAML Syntax Check (push) Successful in 56s
Tests / TOML Syntax Check (push) Successful in 58s
Tests / Mixed Line Ending Check (push) Successful in 56s
Tests / TOML Formatting Check (push) Successful in 56s
Tests / Ruff Linting (push) Successful in 56s
Tests / Ruff Format Check (push) Successful in 1m0s
Tests / Pyright Type Check (push) Successful in 1m16s
Tests / Darglint Docstring Check (push) Successful in 1m10s
Tests / No Docstring Types Check (push) Successful in 57s
Tests / ESLint Check (push) Successful in 1m15s
Tests / Prettier Format Check (push) Successful in 57s
Tests / TypeScript Type Check (push) Successful in 1m24s
Tests / Backend Tests (push) Successful in 1m4s
Tests / TSDoc Lint Check (push) Successful in 30m6s
Tests / Backend Doctests (push) Successful in 59s
Tests / Frontend Tests (push) Successful in 1m38s
Tests / Integration Tests (push) Successful in 26m30s
Tests / End-to-End Tests (push) Failing after 2h4m1s

Signed-off-by: Cliff Hill <xlorep@darkhelm.org>
This commit is contained in:
2025-11-01 18:33:19 -04:00
parent e16141cdbd
commit bf1f3f30df

View File

@@ -606,19 +606,34 @@ jobs:
run: |
echo "=== Network-Resilient E2E Test Execution ==="
# Resilient docker pull
for i in 1 2 3; do
echo "Docker pull attempt $i/3..."
if timeout 300 docker pull dogar.darkhelm.org/darkhelm.org/plex-playlist/cicd:${GITHUB_SHA:-latest}; then
echo "✓ Docker pull successful"
# Enhanced resilient docker pull with aggressive retry logic
export DOCKER_CLI_EXPERIMENTAL=enabled
IMAGE_NAME="dogar.darkhelm.org/darkhelm.org/plex-playlist/cicd:${GITHUB_SHA:-latest}"
for i in 1 2 3 4 5; do
echo "Enhanced Docker pull attempt $i/5..."
echo "Target image: $IMAGE_NAME"
if timeout 1200 docker pull --platform linux/amd64 "$IMAGE_NAME"; then
echo "✓ Docker pull successful after $i attempts"
break
else
if [ $i -eq 3 ]; then
echo "❌ All docker pull attempts failed"
exit 1
if [ $i -eq 5 ]; then
echo "❌ All enhanced docker pull attempts failed"
echo "Final attempt: Trying without platform specification..."
if timeout 1200 docker pull "$IMAGE_NAME"; then
echo "✓ Docker pull successful without platform specification"
break
else
echo "❌ Final fallback pull also failed"
exit 1
fi
fi
echo "⚠ Docker pull attempt $i failed, waiting 20s before retry..."
sleep 20
echo "⚠ Enhanced pull attempt $i failed, cleaning up and retrying in 30s..."
# Clean up partial downloads and free space
docker system prune -f --volumes 2>/dev/null || true
docker rmi "$IMAGE_NAME" 2>/dev/null || true
sleep 30
fi
done
@@ -630,23 +645,33 @@ jobs:
export CI=true &&
export NODE_ENV=test &&
# Network-resilient Playwright setup
# Enhanced network-resilient Playwright setup
echo 'Verifying Playwright installation...' &&
yarn playwright --version &&
echo 'Installing Playwright browser binaries with retries...' &&
for i in 1 2 3; do
echo \"Browser install attempt \$i/3...\" &&
if timeout 600 yarn playwright install --with-deps; then
echo \"✓ Playwright browsers installed successfully\" &&
echo 'Installing Playwright browser binaries with enhanced retries...' &&
for i in 1 2 3 4; do
echo \"Enhanced browser install attempt \$i/4...\" &&
# Use longer timeout and Chromium-only for CI reliability
if timeout 900 yarn playwright install --with-deps chromium; then
echo \"✓ Playwright Chromium browser installed successfully\" &&
break
else
if [ \$i -eq 3 ]; then
echo \"❌ All browser install attempts failed\" &&
exit 1
if [ \$i -eq 4 ]; then
echo \"❌ All enhanced browser install attempts failed\" &&
echo \"Attempting emergency fallback without dependencies...\" &&
if timeout 600 yarn playwright install chromium; then
echo \"✓ Emergency fallback browser install successful\" &&
break
else
echo \"❌ Emergency fallback also failed\" &&
exit 1
fi
fi
echo \"⚠ Browser install attempt \$i failed, waiting 30s before retry...\" &&
sleep 30
echo \"⚠ Enhanced browser install attempt \$i failed, waiting 45s before retry...\" &&
# Clear any partial browser downloads
rm -rf ~/.cache/ms-playwright 2>/dev/null || true &&
sleep 45
fi
done &&