Skip to content

Commit 63b4f62

Browse files
fix(ci): honor force-builds on test-only PR native-build gate
When reuse-main-builds-only is active, force-builds should compile fresh instead of failing because no main artifact was found. Co-authored-by: javiergarciavera <javiergarciavera@users.noreply.github.com>
1 parent 615857d commit 63b4f62

3 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/guidelines/E2E_DECISION_TREE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ The native build fingerprint for test-only PRs is computed from **`main` HEAD**
3434

3535
This applies when all changed files match `e2e_test_files` or `e2e_ignorable` filters in `.github/rules/filter-rules.yml`, with at least one E2E test file changed, and no E2E-relevant workflow files were modified.
3636

37-
Use the `force-builds` label or `[force-builds]` commit tag to override reuse and compile fresh builds.
37+
Use the `force-builds` label or `[force-builds]` commit tag to override reuse and compile fresh builds — including on test-only PRs that would otherwise require main-branch artifacts.
3838

3939
## E2E tests skipped by default on new PRs
4040

.github/workflows/build-android-e2e.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,10 @@ jobs:
310310
id: gate
311311
run: |
312312
if [[ "${{ inputs.reuse-main-builds-only }}" == "true" ]]; then
313-
if [[ "${{ steps.find-reusable-build.outputs.found }}" == "true" \
313+
if [[ "${{ steps.force-builds.outputs.force }}" == "true" ]]; then
314+
echo "needs-native-build=true" >> "$GITHUB_OUTPUT"
315+
echo "force-builds override on test-only PR — compiling fresh native build."
316+
elif [[ "${{ steps.find-reusable-build.outputs.found }}" == "true" \
314317
&& "${{ steps.download-reusable-apk.outcome }}" == "success" \
315318
&& "${{ steps.download-reusable-test-apk.outcome }}" == "success" ]]; then
316319
echo "needs-native-build=false" >> "$GITHUB_OUTPUT"

.github/workflows/build-ios-e2e.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,10 @@ jobs:
245245
id: gate
246246
run: |
247247
if [[ "${{ inputs.reuse-main-builds-only }}" == "true" ]]; then
248-
if [[ "${{ steps.find-reusable-build.outputs.found }}" == "true" \
248+
if [[ "${{ steps.force-builds.outputs.force }}" == "true" ]]; then
249+
echo "needs-native-build=true" >> "$GITHUB_OUTPUT"
250+
echo "force-builds override on test-only PR — compiling fresh native build."
251+
elif [[ "${{ steps.find-reusable-build.outputs.found }}" == "true" \
249252
&& "${{ steps.download-reusable-app.outcome }}" == "success" ]]; then
250253
echo "needs-native-build=false" >> "$GITHUB_OUTPUT"
251254
echo "Test-only PR: reusing main branch iOS artifacts from GitHub Actions (no repack)."

0 commit comments

Comments
 (0)