Creating a GitHub Actions Workflow for Android Detox Testing with GitHub CoPilot? What Could Go Wrong?
Last month, I shared my experience using GitHub Copilot to create a React Native app from scratch to be used in my DetoxDemo project in my article, First Time Using GitHub CoPilot to Create a ReactNative LoginPage app. What Could Go Wrong?
This time, I used GitHub Copilot (Claude Opus 4.5) to create a GitHub Actions CI/CD workflow for running Detox end-to-end tests on Android. While GitHub CoPilot is incredibly powerful, it still required significant human guidance to get the workflow passing.
I had a working GitHub Actions Workflow with ios-regression.yml and asked Copilot to create an Android version that matched. Despite this instruction, I had to repeatedly ask Copilot to compare against the iOS workflow to create the Android workflow, android-regression.yml
The result? 14 commits, 17 hours, and a lot of lessons learned. Here's the timeline of what went wrong, and what finally worked:
The Stats
Total Commits: 14 commits
Time Span: ~17 hours
Commit Timeline
📊 COMMIT TIMELINE: 14 commits over 17 hours
🕘 9:54 PM - Android support - Initial workflow creation
🕙 10:05 PM - Android support - Initial fixes
🕙 10:19 PM - Add cleanup stage
🕚 11:19 PM - Check Gradle is running
🕚 11:37 PM - Switch to macOS runner - ❌ Failed - macOS doesn't support HVF for Android emulators
🕛 11:56 PM - Upload/download artifacts - Split build and test into separate stages
🕐 12:57 AM - Change arch to arm64-v8a - ❌ Wrong architecture for Linux runners
🕐 1:22 AM - Change arch to arm64-v8a - ❌ Still wrong - needed x86_64
🕗 8:45 AM - Environment variables persist - Script variables not persisting between lines
🕘 9:05 AM - Fix if/fi problem - ❌ Multi-line if/then/else/fi broken - each line runs as separate command
🕤 9:31 AM - Start Metro - ❌ Missing Metro bundler - "Unable to load script" errors
🕑 1:58 PM - Enable Allure only for iOS - ❌ videokitten/scrcpy video recording fails on Android emulators
🕑 2:41 PM - End Metro gracefully - ❌ "Exit code null" - cleanup commands interrupted by emulator shutdown
🕒 3:15 PM - End Metro gracefully
✅ PASSED! Removed manual cleanup - let emulator-runner handle it
What I Had to Have GitHub CoPilot Correct
"Just Make It Like iOS" (4+ times)
Runner & Environment Issues
android-emulator-runner Action Issues
Metro Bundler Issues
Allure/Video Recording Issues
System Dependencies
Documentation Gaps
Lessons that GitHub CoPilot Learned Along the Way
According to GitHub CoPilot, the lessons it learned during this project were:
As always... Happy Testing!
-T.J. Maher
T.J. Maher has been a Software Development Engineer in Test since 2015, chronicling his software testing journey in his blog Adventures in Automation. T.J. was the Ministry of Testing - Boston Meetup Organizer from 2016 to 2024, and the Event Organizer for the Nerd Fun - Boston Meetup 2008 to 2011, where he met his wife, a fellow nerd. He can be reached on BlueSky, Twitter, LinkedIn, YouTube, and will be speaking to Joe Colantonio's AutomationGuild in April 2026.