Quick start
Here’s a minimal workflow to run Patrol tests on Android:.github/workflows/test.yml
Platform-specific configurations
- Android
- iOS
Android emulator testing
If you must run emulators directly:With emulator.wtf
emulator.wtf provides fast, stable Android emulators:With Firebase Test Lab
See the Firebase Test Lab integration guide for complete setup instructions.Complete example from Patrol repository
Here’s a real workflow from Patrol’s own CI:Optimization strategies
Caching
Cache Flutter SDK and dependencies:Parallel testing
Run tests across multiple configurations:Conditional execution
Run tests only when relevant files change:Artifact collection
Always collect test artifacts for debugging:Troubleshooting
Android emulator won't start
Android emulator won't start
Enable KVM acceleration:
Tests timing out
Tests timing out
- Increase the
timeout-minutesvalue (default is 360) - Use faster device labs like emulator.wtf
- Reduce the number of tests or split into multiple jobs
- Check if your app is hanging during startup
Build failures on macOS runners
Build failures on macOS runners
Make sure you’re using the latest macOS runner:And install CocoaPods dependencies:
Permission denied errors
Permission denied errors
Make sure executables have proper permissions:
Best practices
Use device labs
Prefer emulator.wtf or Firebase Test Lab over running emulators directly on CI runners.
Cache aggressively
Cache Flutter SDK, pub cache, and Gradle dependencies to speed up builds.
Run in parallel
Test multiple device configurations simultaneously using matrix strategies.
Collect artifacts
Always upload test videos, logs, and reports for debugging failures.
Next steps
Firebase Test Lab
Learn how to use Firebase Test Lab with GitHub Actions
CI/CD Overview
Back to CI/CD overview