Skip to content

ci: stabilize E2E tests, speed up Android CI, pin actions#388

Open
artus9033 wants to merge 21 commits into
mainfrom
fix/stabilize-e2e-tests
Open

ci: stabilize E2E tests, speed up Android CI, pin actions#388
artus9033 wants to merge 21 commits into
mainfrom
fix/stabilize-e2e-tests

Conversation

@artus9033

@artus9033 artus9033 commented Jun 19, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR:

  • stabilizes flaky E2E tests by scrolling the embedded RN surface into view and reloading with Detox sync disabled, so recovery doesn’t hang until the Jest timeout while waiting for an idle app that never settles due to RN debug animations
  • adds ccache to speed up Android CXX build times
  • builds only one variant (x86_64) of the Android app in CI to speed up the build
  • pins SHA checksums of GH Actions
  • upgrade outdated actions causing warnings
  • disables cache in release workflows for security (both Android cache for BGP release workflow & Node cache for NPM publish workflow)
  • do not show alert in e2e tests on both platforms to stabilize flaky E2E tests
  • improves broken local E2E suite by:
    • running Detox postinstall from the app directory (matches CI’s AppleApp step)
    • adding ci_local_e2e_apply_brownfield_debug_pod_settings Podfile func to turn off Swift module interface emission for Debug on the three Brownfield pods
    • (follow-up issue fixes will follow) - on Expo locally without Metro, with Detox, crashes due to injected Metro-specific debug-only code appear, which may be a bigger issue with the (debug + expo + include prebuilt JS bundle) scenario - CC @adamTrz / @alpharius-ck
  • disable Detox sync on Expo app startup to conserve time (otherwise, same E2E on vanilla take ~15 mins while on Expo: ~40 mins)

Test plan

CI green (few consecutive re-runs of E2E succeed).

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to reduce flakiness in Detox E2E tests by centralizing timing budgets, adding a “reload RN with sync disabled” recovery helper, and using those utilities in AppleApp E2E flows to avoid hangs when RN debug surfaces keep the app non-idle.

Changes:

  • Added shared Detox timing constants (DETOX_TIMING) and reused them for polling/timeout budgets.
  • Introduced reloadReactNativeIgnoringSync() to reload RN without waiting for app idleness.
  • Refactored AppleApp Detox helpers to scroll embedded RN into view and use the new reload + timing utilities.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
apps/brownfield-example-shared-tests/e2e/detoxUtils.cjs Adds sync-ignoring RN reload helper and replaces hardcoded polling delay with shared timing constant.
apps/brownfield-example-shared-tests/e2e/detoxTiming.cjs Introduces centralized timing constants for E2E waits/polling/timeouts.
apps/brownfield-example-shared-tests/e2e/createDetoxJestConfig.cjs Uses centralized test timeout from DETOX_TIMING.
apps/brownfield-example-shared-tests/e2e/appleAppDetoxUtils.cjs Updates AppleApp E2E utilities to scroll + wait using shared timeouts and reload with sync disabled.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread apps/brownfield-example-shared-tests/e2e/appleAppDetoxUtils.cjs
@artus9033 artus9033 changed the title fix(test): stabilize E2E tests fix(test): stabilize E2E tests, speed up Android CI Jun 20, 2026
@artus9033 artus9033 changed the title fix(test): stabilize E2E tests, speed up Android CI ci: stabilize E2E tests, speed up Android CI Jun 20, 2026
@artus9033 artus9033 changed the title ci: stabilize E2E tests, speed up Android CI ci: stabilize E2E tests, speed up Android CI, pin actions Jun 20, 2026
@artus9033 artus9033 requested review from Copilot and hurali97 June 20, 2026 13:38

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Comment thread .github/actions/prepare-android/action.yml
Comment thread .github/actions/prepare-android/action.yml
Comment thread .github/actions/prepare-android/action.yml
Comment thread .github/actions/prepare-android/action.yml

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 42 out of 43 changed files in this pull request and generated 5 comments.

Comment thread apps/RNApp/src/App.tsx
Comment thread apps/ExpoApp55/RNApp.tsx
Comment thread apps/ExpoApp54/RNApp.tsx
Comment thread apps/ExpoApp54/entry.tsx
Comment thread .github/actions/setup/action.yml Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 51 out of 52 changed files in this pull request and generated 2 comments.

Comment on lines 9 to 12
permissions:
actions: read
actions: write
contents: read
issues: write

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

False positive, actions/cache needs this permission to write caches

Comment thread packages/react-native-brownfield/src/expo-config-plugin/ios/podfileHelpers.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 52 out of 53 changed files in this pull request and generated 2 comments.

Comment thread .github/actions/appleapp-road-test/action.yml
Comment thread apps/ExpoApp54/utils/expo-rn-updates.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants