ci: add hardware wallet e2e shard#1045
Conversation
Greptile SummaryThis PR wires up Android CI support for hardware-wallet E2E tests by adding a
Confidence Score: 4/5The workflow change is additive and isolated to CI; production builds are unaffected. The main risk is that Trezor Bridge initialization in the shared APK could subtly affect the two pre-existing staging shards, and the Trezor container startup is not explicit in this workflow but instead relies on the companion test-runner script. The CI change is straightforward: a new matrix shard, a pre-pull step, and two new build env vars. The gap between pulling the Trezor image and actually starting its container (delegated to the companion repo) is worth verifying before this runs in production CI, but is unlikely to cause a hard breakage since failed test attempts are retried and a third failure surfaces correctly. The TREZOR_BRIDGE flag applying to all staging shards deserves a second look to confirm it has no side effects on unrelated tests. .github/workflows/e2e.yml — specifically the build-staging env block (lines 129–130) and the Pull Trezor emulator image step (lines 396–401).
|
| Filename | Overview |
|---|---|
| .github/workflows/e2e.yml | Adds hardware_wallet shard to staging matrix, bakes TREZOR_BRIDGE=true into the shared staging APK build, and pre-pulls the Trezor emulator Docker image before that shard runs. No explicit docker compose up for the Trezor container is added to the workflow — this is delegated to the test runner script in the companion repo. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[detect-changes] --> B[build-local]
A --> C[build-staging\nTREZOR_BRIDGE=true\nTREZOR_BRIDGE_URL set]
A --> D[e2e-branch]
B --> E[e2e-tests-local\nshards: 7]
C --> F[e2e-tests-staging\nshards: 3]
D --> E
D --> F
F --> G[multi_address_2_regtest]
F --> H[pubky_paykit]
F --> I[hardware_wallet NEW]
I --> J{avd-cache hit?}
J -- miss --> K[Create AVD snapshot]
J -- hit --> L[Download APK regtest]
K --> L
L --> M[npm ci]
M --> N[Pull Trezor emulator image\ndocker compose --profile trezor pull]
N --> O[Run E2E Tests 1\nBACKEND=regtest\ngrep @hardware_wallet]
O -- success --> P[Done]
O -- fail --> Q[Run E2E Tests 2\nBACKEND=regtest]
Q -- success --> P
Q -- fail --> R[Run E2E Tests 3\nBACKEND=regtest]
R --> S[Upload artifacts on failure]
E --> T[e2e-status]
F --> T
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[detect-changes] --> B[build-local]
A --> C[build-staging\nTREZOR_BRIDGE=true\nTREZOR_BRIDGE_URL set]
A --> D[e2e-branch]
B --> E[e2e-tests-local\nshards: 7]
C --> F[e2e-tests-staging\nshards: 3]
D --> E
D --> F
F --> G[multi_address_2_regtest]
F --> H[pubky_paykit]
F --> I[hardware_wallet NEW]
I --> J{avd-cache hit?}
J -- miss --> K[Create AVD snapshot]
J -- hit --> L[Download APK regtest]
K --> L
L --> M[npm ci]
M --> N[Pull Trezor emulator image\ndocker compose --profile trezor pull]
N --> O[Run E2E Tests 1\nBACKEND=regtest\ngrep @hardware_wallet]
O -- success --> P[Done]
O -- fail --> Q[Run E2E Tests 2\nBACKEND=regtest]
Q -- success --> P
Q -- fail --> R[Run E2E Tests 3\nBACKEND=regtest]
R --> S[Upload artifacts on failure]
E --> T[e2e-status]
F --> T
Reviews (1): Last reviewed commit: "ci: add hardware wallet e2e shard" | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fd7b1c264
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
migt've merged too early :|, sorry for that |
I think it should be fine 👍 |
Refs #1038
Companion PR: synonymdev/bitkit-e2e-tests#184
This PR adds the Android CI wiring for hardware-wallet emulator E2E coverage.
Description
hardware_walletstaging shard that runs the@hardware_walletE2E tests from the companion E2E test branch.Preview
N/A - CI workflow change only.
QA Notes
Manual Tests
N/A
Automated Checks
hardware-wallet.e2e.tsby companion PR Test/trezor foundations e2e tests bitkit-e2e-tests#184: connects the Trezor emulator, verifies settings/home visibility and removal, receives on-chain hardware funds, and transfers hardware funds to Spending.hardware_walletstaging shard should build the regtest APK withTREZOR_BRIDGE=true, pull the Trezor User Env image, and run@hardware_walletwithBACKEND=regtest.