To debug failing GitHub Actions workflows, follow this process using the GitHub MCP Server tools:
- •
List recent workflow runs using
list_workflow_runsto find the failing run and its ID. - •
Get failed job logs using
get_job_logswithfailed_only: trueandreturn_content: trueto read the actual failure output. - •
Categorize the failure based on the job name and error output:
- •
flutter-analyzejob: Dart analysis warnings or errors. Look for the specific file and warning. Fix the Dart code. - •
flutter-testjob: Unit or widget test failure. Read the test name and assertion failure. Fix the test or the code it tests. - •
flutter-build-androidjob: Android build failure. Checkbuild.gradle, SDK versions, ProGuard rules, signing config. - •
flutter-build-iosjob: iOS build failure. Check Xcode project settings, provisioning profiles, CocoaPods, minimum deployment target (must be iOS 17). - •
firebase-deploy-functionsjob: Cloud Functions deployment failure. Check TypeScript compilation errors infunctions/src/. - •
firebase-deploy-rulesjob: Firestore or Storage rules syntax error. Validate rules locally withfirebase emulators:exec. - •
integration-testjob: Integration test failure. Check Firebase Emulator logs and test output.
- •
- •
Check the triggering commit to see what changed — the failure is almost always in recently modified files.
- •
Reproduce locally before pushing a fix:
- •
flutter analyzefor lint issues - •
flutter testfor test failures - •
cd functions && npm run buildfor Cloud Functions - •
firebase emulators:exec --only firestore 'npm test'for rules tests
- •
- •
Fix the issue with the minimal change needed.
- •
Verify the fix passes locally before pushing.