1414 required : true
1515 type : string
1616 outputs :
17- # Raw filter outputs
17+ # Raw filter outputs — exposed for fine-grained use by callers
1818 ios_native :
19- description : ' Whether iOS native files changed'
19+ description : ' Whether SDK iOS native files changed'
2020 value : ${{ jobs.changes.outputs.ios_native }}
2121 android_native :
22- description : ' Whether Android native files changed'
22+ description : ' Whether SDK Android native files changed'
2323 value : ${{ jobs.changes.outputs.android_native }}
2424 js_source :
2525 description : ' Whether JS/TS source files changed'
2626 value : ${{ jobs.changes.outputs.js_source }}
2727 js_test :
2828 description : ' Whether JS/TS test files changed'
2929 value : ${{ jobs.changes.outputs.js_test }}
30+ sample_react_native :
31+ description : ' Whether the React Native sample app changed'
32+ value : ${{ jobs.changes.outputs.sample_react_native }}
33+ sample_expo :
34+ description : ' Whether the Expo sample app changed'
35+ value : ${{ jobs.changes.outputs.sample_expo }}
3036 e2e_tests :
31- description : ' Whether E2E test files changed'
37+ description : ' Whether E2E test infrastructure changed'
3238 value : ${{ jobs.changes.outputs.e2e_tests }}
3339 perf_tests :
34- description : ' Whether performance test files changed'
40+ description : ' Whether performance test infrastructure changed'
3541 value : ${{ jobs.changes.outputs.perf_tests }}
3642 ci :
37- description : ' Whether CI workflow files changed'
43+ description : ' Whether CI workflow/action files changed'
3844 value : ${{ jobs.changes.outputs.ci }}
39- # Convenience: should iOS-related jobs run?
45+ # Convenience outputs consumed by individual workflows
4046 needs_ios :
41- description : ' Whether iOS jobs should run'
47+ description : ' Whether iOS jobs should run (native tests, E2E, sample builds) '
4248 value : ${{ jobs.changes.outputs.needs_ios }}
43- # Convenience: should Android-related jobs run?
4449 needs_android :
45- description : ' Whether Android jobs should run'
50+ description : ' Whether Android jobs should run (native tests, E2E, sample builds) '
4651 value : ${{ jobs.changes.outputs.needs_android }}
52+ needs_sample_react_native :
53+ description : ' Whether the React Native sample app workflow should run'
54+ value : ${{ jobs.changes.outputs.needs_sample_react_native }}
55+ needs_sample_expo :
56+ description : ' Whether the Expo sample app workflow should run'
57+ value : ${{ jobs.changes.outputs.needs_sample_expo }}
4758
4859jobs :
4960 changes :
@@ -54,11 +65,15 @@ jobs:
5465 android_native : ${{ steps.filter.outputs.android_native }}
5566 js_source : ${{ steps.filter.outputs.js_source }}
5667 js_test : ${{ steps.filter.outputs.js_test }}
68+ sample_react_native : ${{ steps.filter.outputs.sample_react_native }}
69+ sample_expo : ${{ steps.filter.outputs.sample_expo }}
5770 e2e_tests : ${{ steps.filter.outputs.e2e_tests }}
5871 perf_tests : ${{ steps.filter.outputs.perf_tests }}
5972 ci : ${{ steps.filter.outputs.ci }}
6073 needs_ios : ${{ steps.evaluate.outputs.needs_ios }}
6174 needs_android : ${{ steps.evaluate.outputs.needs_android }}
75+ needs_sample_react_native : ${{ steps.evaluate.outputs.needs_sample_react_native }}
76+ needs_sample_expo : ${{ steps.evaluate.outputs.needs_sample_expo }}
6277 steps :
6378 - uses : actions/checkout@v4
6479
@@ -68,12 +83,14 @@ jobs:
6883 with :
6984 filters : .github/file-filters.yml
7085
71- - name : Evaluate platform needs
86+ - name : Evaluate what needs to run
7287 id : evaluate
7388 env :
7489 IOS_NATIVE : ${{ steps.filter.outputs.ios_native }}
7590 ANDROID_NATIVE : ${{ steps.filter.outputs.android_native }}
7691 JS_SOURCE : ${{ steps.filter.outputs.js_source }}
92+ SAMPLE_RN : ${{ steps.filter.outputs.sample_react_native }}
93+ SAMPLE_EXPO : ${{ steps.filter.outputs.sample_expo }}
7794 CI_CHANGED : ${{ steps.filter.outputs.ci }}
7895 E2E_TESTS : ${{ steps.filter.outputs.e2e_tests }}
7996 IS_MAIN_OR_RELEASE : ${{ inputs.caller_event_name == 'push' && (inputs.caller_ref == 'refs/heads/main' || startsWith(inputs.caller_ref, 'refs/heads/release/')) }}
@@ -82,18 +99,22 @@ jobs:
8299 echo "ios_native=$IOS_NATIVE"
83100 echo "android_native=$ANDROID_NATIVE"
84101 echo "js_source=$JS_SOURCE"
102+ echo "sample_react_native=$SAMPLE_RN"
103+ echo "sample_expo=$SAMPLE_EXPO"
85104 echo "ci=$CI_CHANGED"
86105 echo "e2e_tests=$E2E_TESTS"
87106 echo "is_main_or_release=$IS_MAIN_OR_RELEASE"
88107
89- # iOS is needed if :
90- # - iOS native code changed
108+ # iOS/Android native test suites and E2E builds run when :
109+ # - The SDK's own native code changed (packages/core/ios or android)
91110 # - JS source changed (may affect native bridges)
92- # - CI config changed (need to validate workflows)
93- # - E2E tests changed (they test both platforms end-to-end)
111+ # - CI config changed (need to validate workflows themselves )
112+ # - E2E test infra changed (they test both platforms end-to-end)
94113 # - Push to main or release branch (always run everything)
95- # Note: perf_tests changes only affect the `metrics` job in e2e-v2.yml,
96- # not the native test suites or sample app builds.
114+ # Sample app changes do NOT trigger the full native test suite —
115+ # they only trigger their own sample-application workflows.
116+ # Performance test changes do NOT trigger native tests either —
117+ # they only trigger the metrics job in e2e-v2.yml.
97118 if [[ "$IOS_NATIVE" == "true" \
98119 || "$JS_SOURCE" == "true" \
99120 || "$CI_CHANGED" == "true" \
@@ -106,14 +127,6 @@ jobs:
106127 echo "=> needs_ios=false"
107128 fi
108129
109- # Android is needed if:
110- # - Android native code changed
111- # - JS source changed (may affect native bridges)
112- # - CI config changed (need to validate workflows)
113- # - E2E tests changed (they test both platforms end-to-end)
114- # - Push to main or release branch (always run everything)
115- # Note: perf_tests changes only affect the `metrics` job in e2e-v2.yml,
116- # not the native test suites or sample app builds.
117130 if [[ "$ANDROID_NATIVE" == "true" \
118131 || "$JS_SOURCE" == "true" \
119132 || "$CI_CHANGED" == "true" \
@@ -125,3 +138,33 @@ jobs:
125138 echo "needs_android=false" >> "$GITHUB_OUTPUT"
126139 echo "=> needs_android=false"
127140 fi
141+
142+ # React Native sample workflow runs when the RN sample itself changed,
143+ # or when anything that the sample depends on changed (SDK source, CI).
144+ if [[ "$SAMPLE_RN" == "true" \
145+ || "$JS_SOURCE" == "true" \
146+ || "$IOS_NATIVE" == "true" \
147+ || "$ANDROID_NATIVE" == "true" \
148+ || "$CI_CHANGED" == "true" \
149+ || "$IS_MAIN_OR_RELEASE" == "true" ]]; then
150+ echo "needs_sample_react_native=true" >> "$GITHUB_OUTPUT"
151+ echo "=> needs_sample_react_native=true"
152+ else
153+ echo "needs_sample_react_native=false" >> "$GITHUB_OUTPUT"
154+ echo "=> needs_sample_react_native=false"
155+ fi
156+
157+ # Expo sample workflow runs when the Expo sample itself changed,
158+ # or when anything that the sample depends on changed (SDK source, CI).
159+ if [[ "$SAMPLE_EXPO" == "true" \
160+ || "$JS_SOURCE" == "true" \
161+ || "$IOS_NATIVE" == "true" \
162+ || "$ANDROID_NATIVE" == "true" \
163+ || "$CI_CHANGED" == "true" \
164+ || "$IS_MAIN_OR_RELEASE" == "true" ]]; then
165+ echo "needs_sample_expo=true" >> "$GITHUB_OUTPUT"
166+ echo "=> needs_sample_expo=true"
167+ else
168+ echo "needs_sample_expo=false" >> "$GITHUB_OUTPUT"
169+ echo "=> needs_sample_expo=false"
170+ fi
0 commit comments