ci: implement GitHub Actions runs for android ui tests (WPB-23413)#4605
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. |
| S3_FOLDER="artifacts/megazord/android/reloaded/staging/compat/" | ||
| APP_ID="com.waz.zclient.dev" | ||
| ;; | ||
| "column-1") |
There was a problem hiding this comment.
Could you remove the paths for the bund builds here, please? We don't need them if related tests are in closed repo and don't want to expose those paths. This applies for column-1, column-2 and column-3.
| "com.waz.zclient.dev" | ||
| "com.wire.internal" | ||
| "com.wire.android.internal" | ||
| "com.wire.android.bund" |
There was a problem hiding this comment.
Same here, please remove "com.wire.android.bund", "com.wire.android.bund.column2"and "com.wire.android.bund.column3"
|
| ktx-serialization = "1.8.1" | ||
| koin = "3.5.3" | ||
| datafaker = "2.4.2" | ||
| datafaker = "1.9.0" |
There was a problem hiding this comment.
question: any reason why the downgrade? we can leave a comment next to it in case is necessary.
There was a problem hiding this comment.
One thing we need to do, for clarity and maintainability, is to have all the scripts in here in their own file rather than writing it on this workflow so we only call them here later.
We have the folder scripts/ to put them, python, bash you name it, let's move it there for clarity.
Take a look for example at https://github.com/wireapp/wire-android/blob/develop/scripts/generate_whatsnew_notes.py
| # Ensure required CLI tools are available on the runner. | ||
| - name: Ensure required tools exist | ||
| run: | | ||
| set -euo pipefail |
There was a problem hiding this comment.
here for example should live in its own script under scripts
| exit 1 | ||
| fi | ||
|
|
||
| python3 - <<'PY' |
There was a problem hiding this comment.
here for example should live in its own script under scripts



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.