Skip to content

ci: implement GitHub Actions runs for android ui tests (WPB-23413)#4605

Open
emmaoke-w wants to merge 21 commits intodevelopfrom
ci/WPB-23413-qa-ui-tests-v1
Open

ci: implement GitHub Actions runs for android ui tests (WPB-23413)#4605
emmaoke-w wants to merge 21 commits intodevelopfrom
ci/WPB-23413-qa-ui-tests-v1

Conversation

@emmaoke-w
Copy link
Contributor

@emmaoke-w emmaoke-w commented Feb 19, 2026

https://wearezeta.atlassian.net/browse/WPB-23413


PR Submission Checklist for internal contributors

  • The PR Title

    • conforms to the style of semantic commits messages¹ supported in Wire's Github Workflow²
    • contains a reference JIRA issue number like SQPIT-764
    • answers the question: If merged, this PR will: ... ³
  • The PR Description

    • is free of optional paragraphs and you have filled the relevant parts to the best of your ability

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

  • If “auto” (empty device id) → locks the shared device pool so auto-runs don’t collide

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:

  • GitHub link to other pull request

Testing

Test Coverage (Optional)

  • I have added automated test to this contribution

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)

  • Wire's Github Workflow has automatically linked the PR to a JIRA issue

PR Post Merge Checklist for internal contributors

  • If any soft of configuration variable was introduced by this PR, it has been added to the relevant documents and the CI jobs have been updated.

References
  1. https://sparkbox.com/foundry/semantic_commit_messages
  2. https://github.com/wireapp/.github#usage
  3. E.g. feat(conversation-list): Sort conversations by most emojis in the title #SQPIT-764.

@pull-request-size
Copy link

Ups 🫰🟨

This PR is too big. Please try to break it up into smaller PRs.

@sonarqubecloud
Copy link

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments