Commit 54848c1
authored
ci(actions): setup-e2e-env skip guards (Android, runner_provider input) (#29780)
## **Description**
Phase 2 of INFRA-3594 — adds a `runner_provider` input to the
`setup-e2e-env` composite action and short-circuits Android
toolchain-install steps when the caller declares `runner_provider ==
'namespace'` (the metamask-android-build image already bakes the pinned
toolchain).
**`.github/actions/setup-e2e-env/action.yml`**:
- New `runner_provider` input. Default `current` — preserves
byte-identical behaviour for existing GitHub-hosted / Cirrus callers.
- `Setup Java` step skipped when `inputs.runner_provider == 'namespace'`
(Temurin 17 is baked at `/usr/lib/jvm/temurin-17-jdk-amd64`; Gradle
resolves it from the image's OS env).
- `Install required emulator dependencies` (apt-get) skipped when
`inputs.runner_provider == 'namespace'` (libpulse0 / libglu1-mesa /
libnss3 / libxss1 are pre-installed).
**Caller wiring** — forwards `runner_provider` from each reusable
workflow into the action's `with:` block:
- `build-android-e2e.yml`
- `build-ios-e2e.yml`
- `run-e2e-workflow.yml`
`update-e2e-fixtures.yml` is intentionally untouched — it has no Phase 0
`runner_provider` input and its `runs-on` has no namespace ternary.
iOS-side guards investigated and deferred: no meaningful skip targets
due to version mismatches. `applesimutils` is self-guarded internally;
`xcodes select` must run because Tahoe defaults to 26.1.1; Ruby/Bundler
pin mismatches force install.
actionlint clean (zero baseline drift).
**End-to-end validation** on namespace:
https://github.com/MetaMask/metamask-mobile/actions/runs/25546769544
- Build Android E2E APKs ✓ (19m20s) — `Setup Java` step verified skipped
(no `Run actions/setup-java` log group; Gradle picked up Temurin 17 from
the baked image).
- All 26 Android E2E smoke jobs ✓.
- iOS smoke timeouts on this run are unrelated macOS-runner issues (iOS
Build ✓; iOS path doesn't traverse `Setup Java`). Re-run dispatched.
- Validation after fixing conflicts
https://github.com/MetaMask/metamask-mobile/actions/runs/25659336212/job/75324978097
## **Changelog**
CHANGELOG entry: null
## **Related issues**
Fixes: INFRA-3594
## **Manual testing steps**
```gherkin
Feature: setup-e2e-env runner_provider input
Scenario: namespace dispatch skips toolchain install
Given the metamask-android-build image bakes Temurin 17 and emulator apt-deps
When CI is dispatched with runner_provider=namespace
Then Setup Java step is skipped (no `Run actions/setup-java` log group)
And Install required emulator dependencies step is skipped
And Build Android E2E APKs succeeds using JDK 17 from the image
And all 26 Android E2E smoke jobs pass
Scenario: existing callers see no behaviour change
Given runner_provider defaults to "current"
When a caller does not pass runner_provider
Then Setup Java and apt-deps steps run as before on GitHub-hosted / Cirrus runners
```
## **Screenshots/Recordings**
N/A — CI/infra-only change.
## **Pre-merge author checklist**
- [ ] I've followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [ ] I've completed the PR template to the best of my ability
- [ ] I've included tests if applicable
- [ ] I've documented my code using [JSDoc](https://jsdoc.app/) format
if applicable
- [ ] I've applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
Not required for external contributors.
## **Pre-merge reviewer checklist**
- [ ] I've manually tested the PR (e.g. pull and build branch, run the
app, test code being changed).
- [ ] I confirm that this PR addresses all acceptance criteria described
in the ticket it closes and includes the necessary testing evidence such
as recordings and or screenshots.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Medium Risk**
> Medium risk because it changes CI setup conditions and can break
Android builds/tests if `runner_provider` is mis-set or runner images
diverge from the assumed baked toolchain/deps.
>
> **Overview**
> Introduces a new `runner_provider` input on the `setup-e2e-env`
composite action (default `current`) and uses it to **short-circuit
Android-only setup** on Namespace runners.
>
> When `runner_provider == 'namespace'`, the action now skips
`actions/setup-java` and the Linux `apt-get` emulator dependency
install, and the reusable workflows `build-android-e2e.yml`,
`build-ios-e2e.yml`, and `run-e2e-workflow.yml` forward
`runner_provider` into the action’s `with:` block.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
f1d87fa. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 0dc3a22 commit 54848c1
4 files changed
Lines changed: 12 additions & 2 deletions
File tree
- .github
- actions/setup-e2e-env
- workflows
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
| |||
116 | 120 | | |
117 | 121 | | |
118 | 122 | | |
119 | | - | |
| 123 | + | |
| 124 | + | |
120 | 125 | | |
121 | 126 | | |
122 | 127 | | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
126 | | - | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
127 | 134 | | |
128 | 135 | | |
129 | 136 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| 196 | + | |
196 | 197 | | |
197 | 198 | | |
198 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
174 | 174 | | |
175 | 175 | | |
176 | 176 | | |
| 177 | + | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
| 121 | + | |
121 | 122 | | |
122 | 123 | | |
123 | 124 | | |
| |||
0 commit comments