Skip to content

Commit 6636487

Browse files
committed
chore: disable some of upstream pipelines (#33)
* chore: disable some of upstream pipelines * tests: update snapshot for visionOS * chore: disable more jobs, fix isVisionOS * fix: Keyboard.js, adjust pipeline_selection.js * feat: run iOS tests every night
1 parent ce20954 commit 6636487

File tree

13 files changed

+67
-10
lines changed

13 files changed

+67
-10
lines changed

.circleci/configurations/test_workflows/testAndroid.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
tests_android:
22
when:
33
and:
4+
- equal: [ true, false ] # Disable for visionOS
45
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
56
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
67
jobs:

.circleci/configurations/test_workflows/testE2E.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
tests_e2e:
22
when:
33
and:
4+
- equal: [ true, false ] # Disable for visionOS
45
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
56
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
67
jobs:

.circleci/configurations/test_workflows/testIOS.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
test_ios:
22
when:
33
and:
4+
- equal: [ true, false ] # Disable for visionOS
45
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
56
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
67
jobs:

.circleci/configurations/test_workflows/testJS.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
- test_js:
1010
name: test_js_prev_lts
1111
executor: nodeprevlts
12-
- test_windows
12+
# Not needed for visionOS
13+
# - test_windows

.circleci/configurations/workflows.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ workflows:
126126
publish_bumped_packages:
127127
when:
128128
and:
129+
- equal: [ 'https://github.com/facebook/react-native', << pipeline.project.git_url >> ]
129130
- equal: [ false, << pipeline.parameters.run_release_workflow >> ]
130131
- equal: [ false, << pipeline.parameters.run_nightly_workflow >> ]
131132
jobs:

.github/workflows/ios-tests.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,18 @@
11
name: ios-tests
22

3+
4+
# on:
5+
# push:
6+
# branches:
7+
# - main
8+
# pull_request:
9+
# branches:
10+
# - "*"
11+
12+
# For visionOS we run iOS tests every night
313
on:
4-
push:
5-
branches:
6-
- main
7-
pull_request:
8-
branches:
9-
- "*"
14+
schedule:
15+
- cron: '0 0 * * *'
1016

1117
jobs:
1218
test_ios_rntester-Hermes:

packages/react-native/Libraries/Components/Keyboard/Keyboard.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import NativeEventEmitter from '../../EventEmitter/NativeEventEmitter';
1414
import LayoutAnimation from '../../LayoutAnimation/LayoutAnimation';
1515
import dismissKeyboard from '../../Utilities/dismissKeyboard';
1616
import Platform from '../../Utilities/Platform';
17-
import NativeKeyboardObserver from './NativeKeyboardObserver';
1817
import warnOnce from '../../Utilities/warnOnce';
18+
import NativeKeyboardObserver from './NativeKeyboardObserver';
1919

2020
export type KeyboardEventName = $Keys<KeyboardEventDefinitions>;
2121

@@ -161,7 +161,7 @@ class Keyboard {
161161
context?: mixed,
162162
): EventSubscription {
163163
if (Platform.isVisionOS) {
164-
return;
164+
return {remove() {}};
165165
}
166166

167167
return this._emitter.addListener(eventType, listener);

packages/react-native/Libraries/Components/Pressable/__tests__/__snapshots__/Pressable-test.js.snap

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ exports[`<Pressable /> should render as expected: should deep render when mocked
3131
onResponderTerminate={[Function]}
3232
onResponderTerminationRequest={[Function]}
3333
onStartShouldSetResponder={[Function]}
34+
visionos_hoverEffect="highlight"
3435
>
3536
<View />
3637
</View>
@@ -67,6 +68,7 @@ exports[`<Pressable /> should render as expected: should deep render when not mo
6768
onResponderTerminate={[Function]}
6869
onResponderTerminationRequest={[Function]}
6970
onStartShouldSetResponder={[Function]}
71+
visionos_hoverEffect="highlight"
7072
>
7173
<View />
7274
</View>
@@ -115,6 +117,7 @@ exports[`<Pressable disabled={true} /> should be disabled when disabled is true:
115117
onResponderTerminate={[Function]}
116118
onResponderTerminationRequest={[Function]}
117119
onStartShouldSetResponder={[Function]}
120+
visionos_hoverEffect="highlight"
118121
>
119122
<View />
120123
</View>
@@ -151,6 +154,7 @@ exports[`<Pressable disabled={true} /> should be disabled when disabled is true:
151154
onResponderTerminate={[Function]}
152155
onResponderTerminationRequest={[Function]}
153156
onStartShouldSetResponder={[Function]}
157+
visionos_hoverEffect="highlight"
154158
>
155159
<View />
156160
</View>
@@ -203,6 +207,7 @@ exports[`<Pressable disabled={true} accessibilityState={{}} /> should be disable
203207
onResponderTerminate={[Function]}
204208
onResponderTerminationRequest={[Function]}
205209
onStartShouldSetResponder={[Function]}
210+
visionos_hoverEffect="highlight"
206211
>
207212
<View />
208213
</View>
@@ -239,6 +244,7 @@ exports[`<Pressable disabled={true} accessibilityState={{}} /> should be disable
239244
onResponderTerminate={[Function]}
240245
onResponderTerminationRequest={[Function]}
241246
onStartShouldSetResponder={[Function]}
247+
visionos_hoverEffect="highlight"
242248
>
243249
<View />
244250
</View>
@@ -293,6 +299,7 @@ exports[`<Pressable disabled={true} accessibilityState={{checked: true}} /> shou
293299
onResponderTerminate={[Function]}
294300
onResponderTerminationRequest={[Function]}
295301
onStartShouldSetResponder={[Function]}
302+
visionos_hoverEffect="highlight"
296303
>
297304
<View />
298305
</View>
@@ -329,6 +336,7 @@ exports[`<Pressable disabled={true} accessibilityState={{checked: true}} /> shou
329336
onResponderTerminate={[Function]}
330337
onResponderTerminationRequest={[Function]}
331338
onStartShouldSetResponder={[Function]}
339+
visionos_hoverEffect="highlight"
332340
>
333341
<View />
334342
</View>
@@ -391,6 +399,7 @@ exports[`<Pressable disabled={true} accessibilityState={{disabled: false}} /> sh
391399
onResponderTerminate={[Function]}
392400
onResponderTerminationRequest={[Function]}
393401
onStartShouldSetResponder={[Function]}
402+
visionos_hoverEffect="highlight"
394403
>
395404
<View />
396405
</View>
@@ -427,6 +436,7 @@ exports[`<Pressable disabled={true} accessibilityState={{disabled: false}} /> sh
427436
onResponderTerminate={[Function]}
428437
onResponderTerminationRequest={[Function]}
429438
onStartShouldSetResponder={[Function]}
439+
visionos_hoverEffect="highlight"
430440
>
431441
<View />
432442
</View>

packages/react-native/Libraries/Components/Touchable/__tests__/__snapshots__/TouchableOpacity-test.js.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ exports[`TouchableOpacity renders correctly 1`] = `
3434
"opacity": 1,
3535
}
3636
}
37+
visionos_hoverEffect="highlight"
3738
>
3839
<Text>
3940
Touchable
@@ -75,6 +76,7 @@ exports[`TouchableOpacity renders in disabled state when a disabled prop is pass
7576
"opacity": 1,
7677
}
7778
}
79+
visionos_hoverEffect="highlight"
7880
>
7981
<Text>
8082
Touchable
@@ -116,6 +118,7 @@ exports[`TouchableOpacity renders in disabled state when a key disabled in acces
116118
"opacity": 1,
117119
}
118120
}
121+
visionos_hoverEffect="highlight"
119122
>
120123
<Text>
121124
Touchable

packages/react-native/Libraries/Components/__tests__/__snapshots__/Button-test.js.snap

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ exports[`<Button /> should be disabled and it should set accessibilityState to d
3535
"opacity": 1,
3636
}
3737
}
38+
visionos_hoverEffect="highlight"
3839
>
3940
<View
4041
style={
@@ -101,6 +102,7 @@ exports[`<Button /> should be disabled when disabled is empty and accessibilityS
101102
"opacity": 1,
102103
}
103104
}
105+
visionos_hoverEffect="highlight"
104106
>
105107
<View
106108
style={
@@ -167,6 +169,7 @@ exports[`<Button /> should be disabled when disabled={true} and accessibilitySta
167169
"opacity": 1,
168170
}
169171
}
172+
visionos_hoverEffect="highlight"
170173
>
171174
<View
172175
style={
@@ -234,6 +237,7 @@ exports[`<Button /> should be set importantForAccessibility={no-hide-descendants
234237
"opacity": 1,
235238
}
236239
}
240+
visionos_hoverEffect="highlight"
237241
>
238242
<View
239243
style={
@@ -296,6 +300,7 @@ exports[`<Button /> should be set importantForAccessibility={no-hide-descendants
296300
"opacity": 1,
297301
}
298302
}
303+
visionos_hoverEffect="highlight"
299304
>
300305
<View
301306
style={
@@ -357,6 +362,7 @@ exports[`<Button /> should not be disabled when disabled={false} and accessibili
357362
"opacity": 1,
358363
}
359364
}
365+
visionos_hoverEffect="highlight"
360366
>
361367
<View
362368
style={
@@ -419,6 +425,7 @@ exports[`<Button /> should not be disabled when disabled={false} and accessibili
419425
"opacity": 1,
420426
}
421427
}
428+
visionos_hoverEffect="highlight"
422429
>
423430
<View
424431
style={
@@ -481,6 +488,7 @@ exports[`<Button /> should overwrite accessibilityState with value of disabled p
481488
"opacity": 1,
482489
}
483490
}
491+
visionos_hoverEffect="highlight"
484492
>
485493
<View
486494
style={
@@ -547,6 +555,7 @@ exports[`<Button /> should render as expected 1`] = `
547555
"opacity": 1,
548556
}
549557
}
558+
visionos_hoverEffect="highlight"
550559
>
551560
<View
552561
style={

packages/react-native/Libraries/Utilities/Platform.android.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,11 @@ const Platform: PlatformType = {
6565
return this.constants.isDisableAnimations ?? this.isTesting;
6666
},
6767
// $FlowFixMe[unsafe-getters-setters]
68+
get isVisionOS(): boolean {
69+
// $FlowFixMe[object-this-reference]
70+
return this.constants.interfaceIdiom === 'vision';
71+
},
72+
// $FlowFixMe[unsafe-getters-setters]
6873
get isTV(): boolean {
6974
// $FlowFixMe[object-this-reference]
7075
return this.constants.uiMode === 'tv';

packages/react-native/Libraries/Utilities/Platform.flow.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,8 @@ type AndroidPlatform = {
7878
Manufacturer: string,
7979
|},
8080
// $FlowFixMe[unsafe-getters-setters]
81+
get isVisionOS(): boolean,
82+
// $FlowFixMe[unsafe-getters-setters]
8183
get isTV(): boolean,
8284
// $FlowFixMe[unsafe-getters-setters]
8385
get isTesting(): boolean,

scripts/circleci/pipeline_selection.js

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,23 @@ function _computeAndSavePipelineParameters(
155155
return;
156156
}
157157

158+
// Custom config for visionOS
159+
if (pipelineType === 'VISION_OS') {
160+
const params = {
161+
run_all: false,
162+
run_ios: false,
163+
run_android: false,
164+
run_js: true,
165+
run_e2e: false,
166+
};
167+
168+
const stringifiedParams = JSON.stringify(params, null, 2);
169+
fs.writeFileSync(filePath, stringifiedParams);
170+
console.info(`Generated params:\n${stringifiedParams}`);
171+
172+
return;
173+
}
174+
158175
console.log(`Should run e2e? ${shouldRunE2E}`);
159176
if (pipelineType === 'ALL') {
160177
fs.writeFileSync(
@@ -243,5 +260,5 @@ function filterJobs(outputPath) {
243260
return;
244261
}
245262
}
246-
_computeAndSavePipelineParameters('ALL', outputPath, shouldRunE2E);
263+
_computeAndSavePipelineParameters('VISION_OS', outputPath, shouldRunE2E);
247264
}

0 commit comments

Comments
 (0)