ci: implement GitHub Actions runs for android ui tests (WPB-23413)#4605
Open
ci: implement GitHub Actions runs for android ui tests (WPB-23413)#4605
Conversation
This reverts commit 7d1785f.
Ups 🫰🟨This PR is too big. Please try to break it up into smaller PRs. |
|
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
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.



https://wearezeta.atlassian.net/browse/WPB-23413
PR Submission Checklist for internal contributors
The PR Title
SQPIT-764The PR Description
What's new in this PR?
1) Safe concurrency (device-aware locking)
-Uses a concurrency group keyed by ${{ inputs.androidDeviceId || 'auto' }}:
-If a specific device is requested → locks only that device
2) Input validation + selector resolution
-Validates upgrade inputs (oldBuildNumber required when isUpgrade=true)
-Parses TAGS into either:
-testCaseId (e.g. @TC-8143)
-category (e.g. @regression)
-Rejects unsupported formats (e.g. @key:value) with a clear error
3) Flavor mapping aligned to existing artifact structure
-Maps flavor → S3_FOLDER + APP_ID via an explicit case block
4) APK retrieval from S3 (new + optional old)
-Lists .apk keys under the flavor prefix and resolves:
-latest (highest parsed version)
-build substring match (e.g. build number)
-Upgrade runs fetch two APKs (old + new) and stage them appropriately
5) Device targeting + install logic
-Detects connected devices via adb devices
Supports:
-androidDeviceId set → run on one device
-empty → run on all available devices
-Ensures a clean install by uninstalling known Wire package IDs before install
-Optional downgrade support via enforceAppInstall=true → adds adb install -d
6) Runtime secrets via 1Password
-Installs 1Password CLI in the workflow
-Generates secrets.json into ${RUNNER_TEMP} and symlinks it into the repo
-Cleans up secrets.json before report publication steps
7) Test execution with per-device sharding (parallel)
-Runs one Gradle invocation per device in parallel
Uses:
-numShards = deviceCount (or 1 when running a single test case)
-shardIndex per device
-Sets a separate GRADLE_USER_HOME per device to avoid cache/lock contention
8) Allure reporting + GitHub Pages publishing
-Pulls Allure results from each device
-Merges results while adding helpful metadata:
-device label (model + android version + serial)
-build/run info in environment.properties
-executor.json pointing to the GitHub Actions run
-Generates Allure HTML and publishes to gh-pages/docs/qa-ui-tests
-Adds retention cleanup (KEEP_DAYS=90) for older runs
-Adds a direct report link to the GitHub Actions Step Summary
9) Add Retry
-Default rerun time for failed test is 1 time.
-Failed tests is rerun in current Job
Issues
Briefly describe the issue you have solved or implemented with this pull request. If the PR contains multiple issues, use a bullet list.
Causes (Optional)
Briefly describe the causes behind the issues. This could be helpful to understand the adopted solutions behind some nasty bugs or complex issues.
Solutions
Briefly describe the solutions you have implemented for the issues explained above.
Dependencies (Optional)
If there are some other pull requests related to this one (e.g. new releases of frameworks), specify them here.
Needs releases with:
Testing
Test Coverage (Optional)
How to Test
Trigger manually via Actions → “QA Android UI Tests” → Run workflow.
Typical examples:
Latest build / all devices
appBuildNumber: latest
androidDeviceId: (empty)
Single device
-androidDeviceId:
-Single testcase
-TAGS: @TC-8143
-Category run
-TAGS: @regression
-Upgrade run
-isUpgrade: true
-appBuildNumber: latest
-oldBuildNumber:
Briefly describe how this change was tested and if applicable the exact steps taken to verify that it works as expected.
Notes (Optional)
Specify here any other facts that you think are important for this issue.
Attachments (Optional)
Attachments like images, videos, etc. (drag and drop in the text box)
PR Post Submission Checklist for internal contributors (Optional)
PR Post Merge Checklist for internal contributors
References
feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.