[PR #6582] [MERGED] Replace test workflow with sharded parallel CI execution #54910

Closed
opened 2026-05-01 20:44:48 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/bitwarden/android/pull/6582
Author: @SaintPatrck
Created: 2/25/2026
Status: Merged
Merged: 2/27/2026
Merged by: @SaintPatrck

Base: mainHead: shard-tests-across-multiple-jobs


📝 Commits (10+)

  • 42f2749 Add sharded test workflow for parallel CI execution
  • 72a08d0 Skip test execution in generateCoverageReport lane
  • dae1483 Replace aggregate-coverage with per-shard Codecov uploads
  • 347bfb4 Add Codecov notify job to coordinate parallel coverage uploads
  • 93ea3af Fix sharded test workflow: add testharness, fix failure detection
  • a9b5ffa Add testharness test report path to artifact upload
  • a3dd5b6 Use Setup Android Build action and wildcard root-level test filter
  • f000074 Consolidate sharded test jobs into single matrix-driven job
  • 4d83787 Replace test.yml with consolidated sharded test workflow
  • d4ad42d Fix test workflow YAML syntax and comment message

📊 Changes

2 files changed (+138 additions, -26 deletions)

View changed files

📝 .github/workflows/test.yml (+105 -26)
📝 fastlane/Fastfile (+33 -0)

📄 Description

🎟️ Tracking

No Jira ticket — CI infrastructure improvement.

📔 Objective

Replace the existing sequential test.yml workflow with a sharded version that runs tests across 7 parallel matrix jobs + 1 coverage notification job, targeting ~12-14 minute wall-clock time versus the current ~45-50 minute sequential run.

New Fastlane lanes: checkLint, testAppShard, testLibraries, generateCoverageReport

Job structure:

A single test job uses a matrix strategy with 7 entries:

Matrix group Fastlane lane What it runs
app-data testAppShard :app data tests
app-ui-auth-tools testAppShard :app UI auth, tools, autofill, credentials, and root-level tests
app-ui-platform testAppShard :app UI platform tests
app-ui-vault testAppShard :app UI vault tests
authenticator testLibraries :authenticator tests
lib-core-network-bridge testLibraries :core :network :cxf :authenticatorbridge :testharness tests
lib-data-ui testLibraries :data :ui tests

Additional jobs:

  • static-analysis — detekt + lint
  • coverage-notify — Sends send-notifications to Codecov after all test jobs complete

The old test.yml is replaced in-place (no parallel workflow needed).

⚠️ Codecov behavior with per-shard uploads

Each shard uploads its own coverage report to Codecov with a unique flag (e.g., app-data, lib-core-network-bridge). Codecov processes these uploads asynchronously, so the PR comment from the Codecov bot will update incrementally as each shard's report is processed. During this intermediate state, you may see:

  • A warning about "a different number of reports uploaded between BASE and HEAD"
  • Artificially low project coverage (e.g., 27% instead of ~86%)

Intermediate Codecov comment showing partial coverage
Example: Codecov PR comment after only 3 of 7 shard uploads have been processed.

This is expected. Once all 7 shard uploads are processed and the coverage-notify job sends the send-notifications signal, Codecov merges all reports and the PR comment updates to reflect the full project coverage.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/bitwarden/android/pull/6582 **Author:** [@SaintPatrck](https://github.com/SaintPatrck) **Created:** 2/25/2026 **Status:** ✅ Merged **Merged:** 2/27/2026 **Merged by:** [@SaintPatrck](https://github.com/SaintPatrck) **Base:** `main` ← **Head:** `shard-tests-across-multiple-jobs` --- ### 📝 Commits (10+) - [`42f2749`](https://github.com/bitwarden/android/commit/42f27495285ed8785b32188ba09dd59f4ffdfaae) Add sharded test workflow for parallel CI execution - [`72a08d0`](https://github.com/bitwarden/android/commit/72a08d061eb1e31159172f55fa46ba5715e74c20) Skip test execution in generateCoverageReport lane - [`dae1483`](https://github.com/bitwarden/android/commit/dae14839a07f118a56c53a79722bd9d993ab1ddf) Replace aggregate-coverage with per-shard Codecov uploads - [`347bfb4`](https://github.com/bitwarden/android/commit/347bfb4866b412ae7af4287c6fd269a626f70259) Add Codecov notify job to coordinate parallel coverage uploads - [`93ea3af`](https://github.com/bitwarden/android/commit/93ea3afb96e80d062dc65a3a454524572cf1d889) Fix sharded test workflow: add testharness, fix failure detection - [`a9b5ffa`](https://github.com/bitwarden/android/commit/a9b5ffa510f36ad5edd189c28177aeffd304b618) Add testharness test report path to artifact upload - [`a3dd5b6`](https://github.com/bitwarden/android/commit/a3dd5b67c29a0246fd6ead986973ea27c792ef4b) Use Setup Android Build action and wildcard root-level test filter - [`f000074`](https://github.com/bitwarden/android/commit/f000074979d9a586f1505498f141a8c245363759) Consolidate sharded test jobs into single matrix-driven job - [`4d83787`](https://github.com/bitwarden/android/commit/4d83787c4c1fb7623af470a63aada8904da969c5) Replace test.yml with consolidated sharded test workflow - [`d4ad42d`](https://github.com/bitwarden/android/commit/d4ad42d764669b8708681f3abac8969c96c7106f) Fix test workflow YAML syntax and comment message ### 📊 Changes **2 files changed** (+138 additions, -26 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/test.yml` (+105 -26) 📝 `fastlane/Fastfile` (+33 -0) </details> ### 📄 Description ## 🎟️ Tracking No Jira ticket — CI infrastructure improvement. ## 📔 Objective Replace the existing sequential `test.yml` workflow with a sharded version that runs tests across 7 parallel matrix jobs + 1 coverage notification job, targeting ~12-14 minute wall-clock time versus the current ~45-50 minute sequential run. **New Fastlane lanes:** `checkLint`, `testAppShard`, `testLibraries`, `generateCoverageReport` **Job structure:** A single `test` job uses a matrix strategy with 7 entries: | Matrix group | Fastlane lane | What it runs | |-----|------|-------------| | `app-data` | `testAppShard` | `:app` data tests | | `app-ui-auth-tools` | `testAppShard` | `:app` UI auth, tools, autofill, credentials, and root-level tests | | `app-ui-platform` | `testAppShard` | `:app` UI platform tests | | `app-ui-vault` | `testAppShard` | `:app` UI vault tests | | `authenticator` | `testLibraries` | `:authenticator` tests | | `lib-core-network-bridge` | `testLibraries` | `:core :network :cxf :authenticatorbridge :testharness` tests | | `lib-data-ui` | `testLibraries` | `:data :ui` tests | Additional jobs: - `static-analysis` — detekt + lint - `coverage-notify` — Sends `send-notifications` to Codecov after all test jobs complete The old `test.yml` is replaced in-place (no parallel workflow needed). ## ⚠️ Codecov behavior with per-shard uploads Each shard uploads its own coverage report to Codecov with a unique flag (e.g., `app-data`, `lib-core-network-bridge`). Codecov processes these uploads asynchronously, so **the PR comment from the Codecov bot will update incrementally** as each shard's report is processed. During this intermediate state, you may see: - A warning about "a different number of reports uploaded between BASE and HEAD" - Artificially low project coverage (e.g., 27% instead of ~86%) ![Intermediate Codecov comment showing partial coverage]( https://github.com/user-attachments/assets/e889963f-ea47-4abe-a02c-5dfadcf7da36) *Example: Codecov PR comment after only 3 of 7 shard uploads have been processed.* This is expected. Once all 7 shard uploads are processed and the `coverage-notify` job sends the `send-notifications` signal, Codecov merges all reports and the PR comment updates to reflect the full project coverage. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-01 20:44:48 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/android#54910