Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c9161ad
fix(test): stabilize e2e tests
artus9033 Jun 19, 2026
426c69e
fix: relative import in appleAppDetoxUtils
artus9033 Jun 19, 2026
19bd2f0
ci: build only x86_64 android React Native apps to speed up
artus9033 Jun 19, 2026
012a510
ci: ccache for android cxx builds
artus9033 Jun 20, 2026
13b3ae5
ci: pin all actions to SHAs
artus9033 Jun 20, 2026
19af8b3
ci: print GHA groups in composite actions for readability of logs
artus9033 Jun 20, 2026
551f354
ci: upgrade outdated actions
artus9033 Jun 20, 2026
9d30d64
ci: disable caches in release workflows
artus9033 Jun 20, 2026
ccec468
fix(test): do not show expo-updates dialog when in E2E tests
artus9033 Jun 20, 2026
e0a7fc5
ci: limit ccache restore on Android to workflows involving native cod…
artus9033 Jun 20, 2026
a893ed9
fix: self-cr
artus9033 Jun 20, 2026
5860c88
fix: export runtime-only non-test code from shared code
artus9033 Jun 20, 2026
245cd5d
fix(test): fix local E2E test pipeline
artus9033 Jun 21, 2026
a162138
docs: document E2E
artus9033 Jun 21, 2026
cdea19c
ci: upgrade setup-ruby action
artus9033 Jun 21, 2026
4478088
fix(ci): save android caches
artus9033 Jun 21, 2026
34e3ba5
test: disable Detox synchronization only until Expo finishes startup
artus9033 Jun 21, 2026
1a4d43f
test: disable Detox sync only for startup and toast
artus9033 Jun 21, 2026
877083b
refactor: move E2E Podfile fix logic out of the Expo config plugin
artus9033 Jun 21, 2026
62915f1
ci: add brew trust applesimutils formula to resolve warnings
artus9033 Jun 21, 2026
70276d7
fix(ci): install gem xcodeproj if needed
artus9033 Jun 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 73 additions & 12 deletions .github/actions/androidapp-road-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,46 @@ inputs:
runs:
using: composite
steps:
- name: '::group:: Setup & prepare Android'
run: |
echo "::group::Setup & prepare Android"
echo "flavor=${{ inputs.flavor }} rn-project=${{ inputs.rn-project-path }}"
shell: bash

- name: Setup
uses: ./.github/actions/setup
with:
restore-turbo-cache: ${{ inputs.restore-turbo-cache }}

- name: Prepare Android environment
id: prepare-android
uses: ./.github/actions/prepare-android
with:
gradle-workflow-job-context: ${{ inputs.flavor }}
rn-project-path: ${{ inputs.rn-project-path }}
android-ccache: 'true'

- name: '::endgroup:: Setup & prepare Android'
run: echo "::endgroup::"
shell: bash

- name: '::group:: Brownfield Gradle plugin'
run: echo "::group::Brownfield Gradle plugin"
shell: bash

# == Brownfield Gradle Plugin ==
- name: Publish Brownfield Gradle Plugin to Maven Local
run: |
yarn run brownfield:plugin:publish:local
shell: bash

# == RN app ==
- name: '::endgroup:: Brownfield Gradle plugin'
run: echo "::endgroup::"
shell: bash

- name: '::group:: RN app — prebuild, package & publish AAR'
run: echo "::group::RN app — prebuild, package & publish AAR"
shell: bash

- name: Prebuild Expo app
if: ${{ startsWith(inputs.flavor, 'expo') }}
run: |
Expand Down Expand Up @@ -73,20 +96,58 @@ runs:
run: stat ~/.m2/repository/${{ inputs.rn-project-maven-path }}/0.0.1-SNAPSHOT/brownfieldlib-0.0.1-SNAPSHOT-release.aar
shell: bash

# clean up build artifacts to ensure no ENOSPC
- name: Clean up local build artifacts
- name: '::endgroup:: RN app — prebuild, package & publish AAR'
run: echo "::endgroup::"
shell: bash

- name: '::group:: Clean RN android outputs'
run: echo "::group::Clean RN android outputs"
shell: bash

- name: Clean up local RN Android build outputs
run: |
rm -rf ${{ inputs.rn-project-path }}/android/build
rm -rf ${{ inputs.rn-project-path }}/android/.cxx
rm -rf ${{ inputs.rn-project-path }}/android/.gradle
rm -rf ${{ inputs.rn-project-path }}/android/app/build
rm -rf ${{ inputs.rn-project-path }}/android/app/.cxx
rm -rf ${{ inputs.rn-project-path }}/android/app/.gradle
rm -rf ${{ inputs.rn-project-path }}/android/app/build
ANDROID_DIR="${{ inputs.rn-project-path }}/android"
rm -rf "$ANDROID_DIR/build"
rm -rf "$ANDROID_DIR/.cxx"
rm -rf "$ANDROID_DIR/.gradle"
rm -rf "$ANDROID_DIR/app/build"
rm -rf "$ANDROID_DIR/app/.cxx"
rm -rf "$ANDROID_DIR/app/.gradle"
find "$ANDROID_DIR" -maxdepth 2 -name '.cxx' -type d -prune -exec rm -rf {} +
shell: bash

- name: '::endgroup:: Clean RN android outputs'
run: echo "::endgroup::"
shell: bash

# == AndroidApp ==
- name: '::group:: AndroidApp — assemble consumer app'
run: echo "::group::AndroidApp — assemble consumer app"
shell: bash

- name: Build native Android Brownfield app
run: yarn run build:example:android-consumer:${{ inputs.flavor }}
shell: bash

- name: '::endgroup:: AndroidApp — assemble consumer app'
run: echo "::endgroup::"
shell: bash

- name: '::group:: Save ccache & summary'
run: echo "::group::Save ccache & summary"
shell: bash

- name: Save Android ccache
if: steps.prepare-android.outputs.android-ccache-cache-hit != 'true'
uses: actions/cache/save@9255dc7a253b0ccc959486e2bca901246202afeb # v5
with:
path: .android_ccache
key: ${{ steps.prepare-android.outputs.android-ccache-cache-primary-key }}

- name: Log Android ccache stats
uses: ./.github/actions/ccache-summary
with:
name: Android road test (${{ inputs.flavor }})

- name: '::endgroup:: Save ccache & summary'
run: echo "::endgroup::"
shell: bash
76 changes: 68 additions & 8 deletions .github/actions/appleapp-road-test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ inputs:
runs:
using: composite
steps:
- name: '::group:: Setup & prepare iOS'
run: echo "::group::Setup & prepare iOS"
shell: bash

- name: Setup
uses: ./.github/actions/setup
with:
Expand All @@ -36,6 +40,14 @@ runs:
- name: Prepare iOS environment
uses: ./.github/actions/prepare-ios

- name: '::endgroup:: Setup & prepare iOS'
run: echo "::endgroup::"
shell: bash

- name: '::group:: ccache & iOS build caches'
run: echo "::group::ccache & iOS build caches"
shell: bash

- name: Configure ccache environment
run: |
echo "USE_CCACHE=1" >> "$GITHUB_ENV"
Expand All @@ -52,6 +64,7 @@ runs:
if: inputs.run-e2e == 'true'
run: |
brew tap wix/brew
brew trust --formula wix/brew/applesimutils
brew install applesimutils
Comment thread
artus9033 marked this conversation as resolved.
shell: bash

Expand All @@ -60,18 +73,26 @@ runs:
shell: bash

- name: Restore AppleApp ccache
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
.ios_ccache
key: ${{ runner.os }}-rnapp-appleapp-${{ inputs.variant }}-ios-ccache-${{ hashFiles(format('{0}/ios/Podfile.lock', inputs.rn-project-path), format('{0}/ios/*.xcodeproj/project.pbxproj', inputs.rn-project-path), 'apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj') }}
restore-keys: |
${{ runner.os }}-rnapp-appleapp-${{ inputs.variant }}-ios-ccache-

# == RN app ==
- name: '::endgroup:: ccache & iOS build caches'
run: echo "::endgroup::"
shell: bash

- name: '::group:: RN app — pods & package iOS XCFramework'
run: |
echo "::group::RN app — pods & package iOS XCFramework"
echo "variant=${{ inputs.variant }} rn-project=${{ inputs.rn-project-path }}"
shell: bash

- name: Restore Pods cache (RN ${{ inputs.variant }} app)
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: |
${{ inputs.rn-project-path }}/ios/Pods
Expand All @@ -98,6 +119,13 @@ runs:
pod install
shell: bash

- name: Apply Brownfield Debug pod settings (E2E)
if: inputs.variant == 'vanilla' && inputs.run-e2e == 'true'
run: |
source scripts/ci-local-ios-e2e-common.sh
ci_local_e2e_apply_brownfield_debug_pod_settings "${{ github.workspace }}/${{ inputs.rn-project-path }}/ios"
shell: bash

- name: Install pods (RN ${{ inputs.variant }} app)
if: inputs.variant == 'vanilla' && inputs.run-e2e != 'true'
run: |
Expand All @@ -106,7 +134,7 @@ runs:
shell: bash

- name: Restore DerivedData cache (RN ${{ inputs.variant }} app)
uses: actions/cache@v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ${{ inputs.rn-project-path }}/ios/build
key: ${{ runner.os }}-ios-rnapp-${{ inputs.variant }}-derived-data-${{ hashFiles(format('{0}/ios/Podfile.lock', inputs.rn-project-path), format('{0}/ios/*.xcodeproj/project.pbxproj', inputs.rn-project-path)) }}
Expand All @@ -119,14 +147,31 @@ runs:
yarn run brownfield:package:ios
shell: bash

# == AppleApp ==
- name: '::endgroup:: RN app — pods & package iOS XCFramework'
run: echo "::endgroup::"
shell: bash

- name: '::group:: AppleApp — Release road test build'
if: inputs.run-e2e != 'true'
run: echo "::group::AppleApp — Release road test build"
shell: bash

- name: Build Brownfield iOS native app (${{ inputs.variant }})
if: inputs.run-e2e != 'true'
run: |
yarn run build:example:ios-consumer:${{ inputs.variant }}
shell: bash

- name: '::endgroup:: AppleApp — Release road test build'
if: inputs.run-e2e != 'true'
run: echo "::endgroup::"
shell: bash

- name: '::group:: AppleApp — Detox E2E'
if: inputs.run-e2e == 'true'
run: echo "::group::AppleApp — Detox E2E"
shell: bash

- name: Resolve AppleApp E2E settings
if: inputs.run-e2e == 'true'
run: |
Expand Down Expand Up @@ -154,7 +199,7 @@ runs:

- name: Restore Detox build cache (AppleApp)
if: inputs.run-e2e == 'true'
uses: actions/cache@9255dc7a253b0ccc959486e2bca901246202afeb # v5
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: apps/AppleApp/build
key: ${{ runner.os }}-e2e-appleapp-${{ inputs.variant }}-build-${{ hashFiles(format('{0}/ios/Podfile.lock', inputs.rn-project-path), 'apps/AppleApp/Brownfield Apple App.xcodeproj/project.pbxproj', 'apps/brownfield-example-shared-tests/e2e/**') }}
Expand All @@ -176,6 +221,7 @@ runs:
- name: Verify embedded JS bundle in BrownfieldLib (E2E)
if: inputs.run-e2e == 'true'
run: |
echo "::group::Verify embedded JS bundle"
set -euo pipefail
PRODUCTS_DIR="apps/AppleApp/build/Build/Products/${APPLEAPP_E2E_CONFIGURATION}-iphonesimulator"
APP_PATH="$(find "$PRODUCTS_DIR" -maxdepth 1 -name '*.app' -print -quit)"
Expand All @@ -197,28 +243,42 @@ runs:
fi
echo "App executable OK: $EXECUTABLE_PATH ($(wc -c < "$EXECUTABLE_PATH") bytes)"
echo "Embedded bundle OK: $BUNDLE_PATH ($(wc -c < "$BUNDLE_PATH") bytes)"
echo "::endgroup::"
shell: bash

- name: Detox test (AppleApp ${{ inputs.variant }})
if: inputs.run-e2e == 'true'
run: |
echo "::group::Detox test"
rm -rf e2e-artifacts
yarn "$APPLEAPP_E2E_TEST_SCRIPT"
echo "::endgroup::"
working-directory: apps/AppleApp
shell: bash

- name: Upload Detox recordings on failure
if: failure() && inputs.run-e2e == 'true'
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: ${{ inputs.e2e-artifact-name }}-${{ inputs.variant }}-ios-recordings
path: apps/AppleApp/e2e-artifacts
if-no-files-found: warn
retention-days: 5

# ==============
- name: '::endgroup:: AppleApp — Detox E2E'
if: always() && inputs.run-e2e == 'true'
run: echo "::endgroup::"
shell: bash

- name: '::group:: Summary'
run: echo "::group::Summary"
shell: bash

- name: Log ccache stats
uses: ./.github/actions/ccache-summary
with:
name: RN ${{ inputs.variant }} app & AppleApp

- name: '::endgroup:: Summary'
run: echo "::endgroup::"
shell: bash
7 changes: 6 additions & 1 deletion .github/actions/ccache-summary/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,10 @@ runs:
using: composite
steps:
- name: Log ccache stats
run: ccache -s > $GITHUB_STEP_SUMMARY
run: |
{
echo "### ${{ inputs.name }}"
echo
ccache -s
} >> "$GITHUB_STEP_SUMMARY"
shell: bash
Loading
Loading