-
Notifications
You must be signed in to change notification settings - Fork 0
Android CI workflows for linux and windows #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
bpolgar-swo
wants to merge
22
commits into
main
Choose a base branch
from
feature/android-test-workflows
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
based on the iOS approach with composite actions
- Changed both build and test jobs from macos-latest to ubuntu-latest - macOS runners are ARM64 (Apple Silicon), cannot run x86_64 emulators - Added KVM acceleration enablement step for Ubuntu - Fixed stat command syntax for Linux compatibility - Improved package name extraction regex - Updated plan document with architecture fix notes
- Fix adb command not found by adding Android SDK tools to PATH - Fix AVD not found by setting ANDROID_SDK_HOME environment variable - Fix Windows AVD verification with robust string matching - Accept all SDK licenses including android-googlexr-license - Increase ADB timeout to 120s and add emulator health checks - Add debug output for AVD file locations - Remove local planning documents from repository
- Change BUILD_MODE default from Debug to Release - Remove expo-dev-client for Release builds to avoid Expo Dev UI - Ensures standalone production app without development tools
The emulator was crashing with access violation (0xC0000005) when using swiftshader_indirect. This adds retry logic to try multiple GPU modes: 1. auto - Uses WHPX hardware acceleration if available 2. swiftshader_indirect - Software rendering fallback 3. guest - Last resort software rendering Each mode gets 45 seconds to start before falling back to the next.
- Clean up stale lock files before starting emulator - Kill orphaned emulator/QEMU processes between attempts - Restart ADB server for clean state - Use -wipe-data and -no-snapshot-load/-no-snapshot-save flags - Add -no-metrics to suppress metrics warning - Extend timeouts for more reliable startup - Remove temporary push trigger from non-Windows workflow
- Add Remove-EmulatorLocks helper function with null checks and try-catch - Fix 'Object reference not set to an instance of an object' error in retry loop - Add more robust process cleanup between retry attempts - Restart ADB server between retry attempts - Kill both qemu and emulator processes on cleanup
Emulator optimizations: - Add -no-sim, -no-cache, -skip-adb-auth, -no-passive-gps flags - Use -netdelay none and -netspeed full for faster network - Use -screen no-touch (we use ADB commands) - Set -partition-size 2048 for faster wipe AVD config optimizations: - Lower resolution: 720x1280 instead of 1080x2400 - Lower density: 320 instead of 420 - Disable all sensors (proximity, magnetic, orientation, etc) - Disable cameras - Disable GPS in config - Smaller data partition (2G) Workflow changes: - Default to API level 30 (faster/more stable than 34) - Keep pixel_6 device profile GPU/Accel retry configurations: - Try swiftshader_indirect + auto accel - Try gpu off + auto accel - Try swiftshader_indirect + no accel - Try gpu off + no accel
The -partition-size 2048 was causing emulator startup failure because the Android emulator requires values between 10MB and 2047MB (exclusive). Error: partition-size (2048) must be between 10MB and 2047MB
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
based on the iOS approach with composite actions## Android E2E Test Workflows & Cross-Platform Test Improvements
Workflows
New Android CI/CD workflows:
android-build-and-test.yml- Full build and Appium test pipeline for macOS/Ubuntu runnersandroid-build-and-test-windows.yml- Windows-specific build and test pipelineandroid-external-test-example.yml- Example workflow for testing pre-built APKsNew composite actions:
android-install/- Installs APK from artifact or URL on Android emulator (macOS/Ubuntu)android-install-windows/- Windows equivalent with PowerShellandroid-test/- Runs Appium tests with UiAutomator2 driverandroid-test-windows/- Windows equivalentUpdated workflows:
android-build.yml- Added release tagging and artifact publishing to GitHub releasesios-build-and-test.yml- Added ReportPortal integrationios-test/action.yml- Added ReportPortal API key inputGitHub Secrets (✅ Added)
AUTH0_CLIENT_ID_TESTAIRTABLE_API_TOKENAIRTABLE_BASE_IDAIRTABLE_TABLE_NAMEAIRTABLE_EMAILAIRTABLE_FROM_EMAILREPORT_PORTAL_API_KEYGitHub Variables (✅ Added)
REPORT_PORTAL_ENDPOINTREPORT_PORTAL_PROJECTPage Object Model Changes
selectors.js:
byContainsTextAny(...patterns)- OR condition text matching for cross-platform differencestextContainsButNotContains(contains, excludes)- Exclusion pattern matchingbyStartsWithResourceId(prefix)- Prefix matching for resource IDsstaticTextByIdPrefixAndPattern(idPrefix, textPattern)- Combined ID and text pattern matchingspotlightItemsByPrefix(prefix)- Entity-specific spotlight item selectors (ORD, SUB, etc.)spotlights.page.js:
footer.page.js:
byAccessibilityIdfor reliabilitywelcome.page.js:
emailErrorLabelandenterEmailSubTitlegettersTest Changes
home.e2e.js:
navigation.e2e.js:
wdio.conf.js:
failingtest suite for debuggingScripts
run-local-test.sh:
--build-from-artifact URLoption to download and install app from artifact URL.ziparchives and direct.apkfilessetup-test-env.sh:
--platformflag for iOS/Android selection--start-emulatorto launch emulator/simulator by name--list-emulatorsto show available devices.envview-airtable-entries.js: