verify-badges.shโข3.42 kB
#!/bin/bash
echo "๐ Verifying Platform Badges..."
echo "================================"
# Check if badges display correctly
echo -e "\n๐ Badge URLs to verify:"
echo "1. Windows: https://github.com/mickdarling/DollhouseMCP/actions/workflows/core-build-test.yml?query=branch:main"
echo "2. macOS: https://github.com/mickdarling/DollhouseMCP/actions/workflows/core-build-test.yml?query=branch:main"
echo "3. Linux: https://github.com/mickdarling/DollhouseMCP/actions/workflows/core-build-test.yml?query=branch:main"
# Extract badge URLs from README
echo -e "\n๐ Extracting badge links from README..."
grep -E "Platform|Windows|macOS|Linux" README.md | grep -oE "https://[^)]*" | head -4
# Check if the workflow exists
echo -e "\nโ
Checking workflow existence..."
if [ -f ".github/workflows/core-build-test.yml" ]; then
echo "Core Build & Test workflow exists"
else
echo "โ Core Build & Test workflow not found!"
fi
# Verify badge image URLs
echo -e "\n๐ผ๏ธ Badge Image URLs:"
grep -oE "https://img.shields.io/badge/[^?]*" README.md | grep -E "Windows|macOS|Linux"
echo -e "\n๐ Platform CI Status:"
# Use GitHub CLI to check recent workflow runs
if command -v gh &> /dev/null; then
echo "Checking recent Core Build & Test runs..."
gh run list --workflow=core-build-test.yml --limit=1 --json status,conclusion,name | jq -r '.[] | "Status: \(.status), Conclusion: \(.conclusion)"'
else
echo "GitHub CLI not found. Install with: brew install gh"
fi
echo -e "\n๐จ Theme Testing URLs:"
echo "Test badges in different GitHub themes:"
echo "Light theme: https://github.com/mickdarling/DollhouseMCP/tree/feature/platform-specific-badges?theme=light"
echo "Dark theme: https://github.com/mickdarling/DollhouseMCP/tree/feature/platform-specific-badges?theme=dark"
echo -e "\nโฟ Accessibility Testing:"
echo "Badge ALT texts added:"
echo "- Windows: 'Windows Build Status'"
echo "- macOS: 'macOS Build Status'"
echo "- Linux: 'Linux Build Status'"
echo -e "\nโ
Main Branch Query Verification:"
# Verify the query parameter works correctly
echo "Testing if branch:main query parameter filters correctly..."
if command -v curl &> /dev/null; then
# Test if the URL with query parameter is valid
response=$(curl -s -o /dev/null -w "%{http_code}" --max-time 10 --connect-timeout 5 "https://github.com/mickdarling/DollhouseMCP/actions/workflows/core-build-test.yml?query=branch:main")
if [ "$response" = "200" ]; then
echo "โ Query parameter URL is valid (HTTP $response)"
else
echo "โ ๏ธ Query parameter URL returned HTTP $response"
echo " This may indicate workflow access issues or branch name changes"
echo " Please verify the workflow exists and is accessible"
fi
else
echo "curl not found. Skipping HTTP validation."
fi
echo -e "\nโจ Verification complete!"
echo -e "\n๐ Manual Verification Checklist:"
echo "[ ] 1. Click each badge link in the README"
echo "[ ] 2. Verify links show only 'main' branch workflow runs"
echo "[ ] 3. Test badges in light theme: append ?theme=light to GitHub URL"
echo "[ ] 4. Test badges in dark theme: append ?theme=dark to GitHub URL"
echo "[ ] 5. Hover over badges to see ALT text tooltips"
echo "[ ] 6. Test with a screen reader if possible"
echo -e "\n๐ Integration Suggestions:"
echo "Consider adding this script to CI/CD workflows for automated badge verification"