Skip to content

Commit 2f944eb

Browse files
authored
fix(CI): Fix verify react-native-macos-init job (#2199)
* fix: Sync `react-native-macos-init` version with NPM registry * build react-native-macos-init first * fixes
1 parent db89ff4 commit 2f944eb

File tree

3 files changed

+38
-8
lines changed

3 files changed

+38
-8
lines changed

.ado/jobs/build-test-rntester.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ jobs:
103103
displayName: Download visionOS SDDK
104104
inputs:
105105
script: |
106-
set -eox
106+
set -eox pipefail
107107
# https://github.com/actions/runner-images/issues/10559
108108
sudo xcodebuild -runFirstLaunch
109109
sudo xcrun simctl list

.ado/jobs/test-react-native-macos-init.yml

Lines changed: 36 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,22 @@ jobs:
1313

1414
- template: /.ado/templates/apple-tools-setup.yml@self
1515

16+
- task: CmdLine@2
17+
displayName: yarn install react-native-macos-init
18+
inputs:
19+
script: |
20+
set -eox pipefail
21+
cd packages/react-native-macos-init
22+
yarn install
23+
24+
- task: CmdLine@2
25+
displayName: Build react-native-macos-init
26+
inputs:
27+
script: |
28+
set -eox pipefail
29+
cd packages/react-native-macos-init
30+
yarn build
31+
1632
- template: /.ado/templates/verdaccio-init.yml@self
1733

1834
- template: /.ado/templates/verdaccio-publish.yml@self
@@ -21,42 +37,56 @@ jobs:
2137
- task: CmdLine@2
2238
displayName: yarn install (local react-native-macos)
2339
inputs:
24-
script: yarn install --immutable
40+
script: |
41+
set -eox pipefail
42+
yarn install --immutable
2543
2644
- task: CmdLine@2
2745
displayName: yarn install (local react-native-macos-init)
2846
inputs:
2947
script: |
48+
set -eox pipefail
3049
cd packages/react-native-macos-init
3150
yarn install --immutable
3251
3352
- task: CmdLine@2
3453
displayName: yarn build (local react-native-macos-init)
3554
inputs:
3655
script: |
56+
set -eox pipefail
3757
cd packages/react-native-macos-init
3858
yarn build
3959
4060
- task: CmdLine@2
4161
displayName: Init new project
4262
inputs:
43-
script: npx --yes [email protected] init testcli --template [email protected] --skip-install
63+
script: |
64+
set -eox pipefail
65+
npx --yes @react-native-community/cli init testcli --version 0.75 --skip-install
4466
workingDirectory: $(Agent.BuildDirectory)
4567

4668
- task: CmdLine@2
47-
displayName: yarn install (local react-native-macos-init)
69+
displayName: yarn install (testcli)
4870
inputs:
49-
script: yarn install --immutable
71+
script: |
72+
set -eox pipefail
73+
yarn install --mode=update-lockfile
74+
# `update-lockfile` skips the linking step, so we need to run `yarn install` again
75+
yarn install
5076
workingDirectory: $(Agent.BuildDirectory)/testcli
5177

5278
- task: CmdLine@2
5379
displayName: Apply macos template
5480
inputs:
55-
script: npx react-native-macos-init --version latest --overwrite --prerelease
81+
script: |
82+
set -eox pipefail
83+
npx react-native-macos-init --version latest --overwrite --prerelease
5684
workingDirectory: $(Agent.BuildDirectory)/testcli
5785

5886
- task: CmdLine@2
5987
displayName: Run macos [test]
6088
inputs:
61-
script: npx react-native run-macos
89+
script: |
90+
set -eox pipefail
91+
npx react-native run-macos
6292
workingDirectory: $(Agent.BuildDirectory)/testcli

packages/react-native-macos-init/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-native-macos-init",
3-
"version": "2.1.1",
3+
"version": "2.1.2",
44
"description": "CLI to add react-native-macos to an existing react-native project",
55
"main": "index.js",
66
"repository": "https://github.com/microsoft/react-native-macos",

0 commit comments

Comments
 (0)