-
Notifications
You must be signed in to change notification settings - Fork 910
[PM-28504] Add testharness build workflow with dynamic versioning #6181
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
base: main
Are you sure you want to change the base?
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6181 +/- ##
=======================================
Coverage 84.90% 84.90%
=======================================
Files 972 972
Lines 57423 57423
Branches 7916 7916
=======================================
Hits 48753 48753
Misses 5914 5914
Partials 2756 2756 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
- Create .github/workflows/build-testharness.yml for manual workflow dispatch - Configure testharness module to read version from libs.versions.toml - Implement Fastlane-based version management for consistency with other build workflows - Build debug APK (com.bitwarden.testharness.dev-debug.apk) with SHA256 checksum - Use _version.yml reusable workflow with codename "bwth" and base version 0 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
b1abf12 to
5ee4af1
Compare
|
Claude finished @SaintPatrck's task —— View job Final Review AssessmentOverall Assessment: APPROVE ✅ All findings have been addressed:
The PR implements a clean workflow following established patterns from authenticator and app builds. The dynamic versioning integration with |
Corrects regex pattern in build-testharness.yml to match the pattern used in build-authenticator.yml. The previous regex captured the closing quote as part of the version name, which would result in malformed version strings. Before: regex='appVersionName = "([^"]+")' → captures "2025.11.1" After: regex='appVersionName = "([^"]+)"' → captures "2025.11.1" Addresses Finding 2 from code review of PR #6181. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
Changes testharness module to read versionCode and versionName from libs.versions.toml instead of using hardcoded values. This aligns with the pattern used by app and authenticator modules and ensures the setBuildVersionInfo Fastlane task in the workflow actually updates the testharness build version. Before: versionCode = 1 versionName = "1.0.0" After: versionCode = libs.versions.appVersionCode.get().toInt() versionName = libs.versions.appVersionName.get() Addresses Finding 3 from code review of PR #6181. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
| versionCode:"$VERSION_CODE" \ | ||
| versionName:"$VERSION_NAME_INPUT" | ||
|
|
||
| regex='appVersionName = "([^"]+)"' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Details
The regex pattern here differs from the Fastlane setBuildVersionInfo implementation:
Workflow (line 104-107):
regex='appVersionName = "([^"]+)"'
if [[ "$(cat gradle/libs.versions.toml)" =~ $regex ]]; then
VERSION_NAME="${BASH_REMATCH[1]}"
fiFastlane (Fastfile:136):
currentVersionName = tomlLibraryText.match(/appVersionName = "(.+)"/).captures[0]The workflow pattern uses [^"]+ while Fastlane uses .+. While functionally similar for valid version strings, this inconsistency could cause subtle differences in edge cases (e.g., if version contains escaped quotes).
Recommendation: Use the same pattern as Fastlane for consistency:
regex='appVersionName = "(.+)"'This also resolves the "trailing quote" fix mentioned in commit 98dc73b more elegantly.
Updates workflow regex to match the pattern used in Fastlane's setBuildVersionInfo lane for consistency across the codebase. Before: regex='appVersionName = "([^"]+)"' After: regex='appVersionName = "(.+)"' Both patterns work correctly for standard version strings, but using the same pattern as Fastlane improves maintainability and reduces potential confusion. Addresses Finding 1 from code review of PR #6181. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
| name: Calculate Version Name and Number | ||
| uses: bitwarden/android/.github/workflows/_version.yml@main | ||
| with: | ||
| app_codename: "bwth" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 This will trigger a missing tag warning (code), given the purpose of it having the same version of Password Manager would help also.
| app_codename: "bwth" | |
| app_codename: "bwpm" |
| @@ -0,0 +1,131 @@ | |||
| name: Build Test Harness | |||
|
|
|||
| on: | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could go ahead and add a push trigger with a path filtering, something like:
| on: | |
| on: | |
| push: | |
| paths: | |
| - testharness/** |
vvolkgang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, left some comments.

🎟️ Tracking
PM-28504
📔 Objective
Add GitHub Actions workflow for building the testharness module via manual workflow dispatch.
This PR introduces
.github/workflows/build-testharness.ymlto enable on-demand testharness APK builds through GitHub Actions, following the established patterns from the app and authenticator build workflows.Key changes:
build-testharness.ymlwith workflow_dispatch trigger for manual builds_version.ymlreusable workflow (codename: "bwth", base version: 0)setBuildVersionInfofor version management consistencycom.bitwarden.testharness.dev-debug.apkwith SHA256 checksumtestharness/build.gradle.ktsto read version fromlibs.versions.tomlinstead of hardcoded valuesThe workflow enables teams to build and distribute testharness artifacts for credential provider testing and validation without requiring local development environment setup.
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:) or similar for great changes:memo:) or ℹ️ (:information_source:) for notes or general info:question:) for questions:thinking:) or 💭 (:thought_balloon:) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:) for suggestions / improvements:x:) or:warning:) for more significant problems or concerns needing attention:seedling:) or ♻️ (:recycle:) for future improvements or indications of technical debt:pick:) for minor or nitpick changes