Summary:
This change improves the E2E testing by downloading the iOS RNTesterApp that is built in CI instead of building it locally. This should let us save 10 to 20 minutes when we test a new release.
## Changelog:
[Internal] - Use the RNTester app built in CI for release testing on iOS
Pull Request resolved: https://github.com/facebook/react-native/pull/48637
Test Plan:
- build the app in ci
- run `yarn test-e2e-local -c <my-token>` and `yarn test-e2e-local -h false -c <my-token>` and verify that the iOS app is not built, but run in the simulator
Reviewed By: cortinico
Differential Revision: D68161477
Pulled By: cipolleschi
fbshipit-source-id: 577d110f9ff0197a2d3348a08a60e60a4d0a752b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48558
Running `yarn test-e2e-local -t "RNTester" -p "Android" -h true -c <TOKEN>`
currently fails if you start from RNTester Android.
That's because codegen is not built. This commit fixes it.
Changelog:
[Internal] [Changed] - Fix test-e2e-local with RNTester due to unbuilt codegen
Reviewed By: cipolleschi
Differential Revision: D67972074
fbshipit-source-id: c5c721a913b655675ed6e03e60efbb5ccdf613b2
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48365
For a mistake, the local E2E test we use to test a release is still pointing to the release APK instead of using the debug apk.
This change fix that. The change has been manually applied to the release branches, for example [here](https://github.com/facebook/react-native/commit/385318bf6a83b124d9e8eb925932edff02115c85)
## Changelog
[Internal] - use Debug apk instead of release one to test the release
Reviewed By: robhogan
Differential Revision: D67599760
fbshipit-source-id: 224b5b8d8f664bb579b09ee68f1b92c0774a9b5e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48292
These dependencies are making the CI on main to fail.
## Changelog:
[General][Fixed] - Fix peer dependencies on React types
Reviewed By: javache, hoxyq
Differential Revision: D67283609
fbshipit-source-id: b325246f5de654a9ccbf7f96eec24434047a38ee
Summary:
why: running `yarn test-e2e-local -t "RNTestProject" -p "Android" -h false -c $GITHUB_TOKEN` would actually build the app with Hermes even though it's specified as disabled.
This is because of the `if (argv.hermes == null)` condition whose body would not execute.
The condition was changed [recently](https://github.com/facebook/react-native/commit/f322dc7a84eb72370910f6933d0a4fa7780f49bc#diff-56f57bf0eac99b0fda1b2938aceb8d9b663db82c07cb405bd53a01c8689710ffR258).
Reason for `await` being used:
```
Error ┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈┈ scripts/release-testing/test-e2e-local.js:303:32
Cannot get argv.hermes because property hermes is missing in Promise [1]. [prop-missing]
scripts/release-testing/test-e2e-local.js
300│ 'reactNativeArchitectures=arm64-v8a',
301│ 'android/gradle.properties',
302│ );
303│ const hermesEnabled = (argv).hermes === true;
304│
305│ // Update gradle properties to set Hermes as false
306│ if (!hermesEnabled) {
flow-typed/npm/yargs_v17.x.x.js
[1] 80│ argv: Argv | Promise<Argv>;
```
## Changelog:
[INTERNAL] [FIXED] - fix `hermes` param handling in `test-e2e-local.js`
Pull Request resolved: https://github.com/facebook/react-native/pull/48068
Test Plan: tested locally
Reviewed By: cipolleschi
Differential Revision: D66704263
Pulled By: robhogan
fbshipit-source-id: f05f23b95e67bd20025e0b3448df0d284fcb62da
Summary:
Make it clearer to the release crew to avoid using an outdated artifact
for testing a release.
{F1971030533}
Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/48046
Test Plan:
```
yarn test-e2e-local -t "RNTester" -p "Android" -h true -c $GITHUB_TOKEN
```
Reviewed By: robhogan
Differential Revision: D66657082
Pulled By: blakef
fbshipit-source-id: 225128690c180bee7a3d28fdcc7f8c9885a37f0d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47673
Update shared monorepo build script:
- Refactor entry point discovery and file iteration
- Add support for "exports" subpath patterns (skip considering as entry point with warning)
This is required for the incoming migration of `react-native-codegen` to this build setup (D51465053).
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D66121262
fbshipit-source-id: 0deb2c2b26de442ee348ef9de54a1fa144368b6f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47704
Now that we have a min requirement of Node 18.18 on `main`, drop dependency on this polyfill.
Changelog: [Internal]
Reviewed By: vzaidman
Differential Revision: D66162328
fbshipit-source-id: e8ab6669fe14ed177eccf4b861c01df4fb0d405a
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47612
Changelog: [internal]
Just using babel-register so we can use Flow types in the code for the RN integration tests runner.
Reviewed By: sammy-SC
Differential Revision: D65948801
fbshipit-source-id: 6c54b0463fe4b71c818ff1c4faa973cc8b13b5d2
Summary:
While we're waiting for 19 stable, let's bring main back to 18.3.1 ahead of the 0.77 branch cut. We'll land this change just after 19 stable lands.
This is a cherry pick of b93b378fa0 which landed in 0.76 already
bypass-github-export-checks
## Changelog:
[INTERNAL] - Revert React 19RC to React 18.3.1
Pull Request resolved: https://github.com/facebook/react-native/pull/47380
Test Plan: CI
Reviewed By: cipolleschi
Differential Revision: D65430775
Pulled By: cortinico
fbshipit-source-id: f0f211754c8ffe5d037fd299e4de52c29d1d7913
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/47208
Changelog: [internal]
Small change to unify the yarn commands for feature flags into a single `featureflags` command with options.
Reviewed By: NickGerleman, mdvacca
Differential Revision: D64982509
fbshipit-source-id: 3f9d7ac35f61950bd03fef243e1a95625144a0cd
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46987
X-link: https://github.com/facebook/metro/pull/1371
Update `babel/register` to latest version, fixing the bug that were preventing us from updating it previously.
Changelog: [Internal]
Reviewed By: huntie
Differential Revision: D64245277
fbshipit-source-id: f3d07b06a11fbe3a0ed28e22f5b687541782dda9
Summary:
Analyze code was still using the CIRCLECI env variable to retrieve the PR number.
This change uses the github one and also removes a duplicated flow check
## Changelog:
[Internal] - Remove duplicated flow check and use gh PR number rather than CircleCI one
Pull Request resolved: https://github.com/facebook/react-native/pull/46548
Test Plan: Tested locally and in CI
Reviewed By: NickGerleman
Differential Revision: D62883758
Pulled By: cipolleschi
fbshipit-source-id: 0c7e97ea9caf4465972424e0b69a899ecfd07095
Summary:
This pull request replaces the use of mkdirp with Node.js's built-in fs.mkdirSync({ recursive: true }) function, which is available in Node.js version 10.12.0 and above. This change reduces the number of external dependencies and simplifies the codebase by using the native capabilities of Node.js.
The motivation behind this change is to remove the unnecessary mkdirp dependency, as Node.js natively supports recursive directory creation since version 10.12.0. This streamlines the code and reduces the reliance on external libraries.
## Changelog:
[INTERNAL] [REMOVED] - Replaced mkdirp with fs.mkdirSync({ recursive: true }) in build scripts and codegen. Requires Node.js 10.12.0 and above.
Pull Request resolved: https://github.com/facebook/react-native/pull/46388
Test Plan: I ran the build and codegen scripts locally with Node.js version 10.12.0 and above after replacing mkdirp, ensuring the scripts work as expected. No issues were encountered, and all processes, including directory creation and file handling, function correctly.
Reviewed By: cortinico
Differential Revision: D62852488
Pulled By: huntie
fbshipit-source-id: 76f44102a80b499521c156308d276a17d279ce38
Summary:
This is a pick on main of a fix necessary to release 0.76.x
## Changelog:
[INTERNAL] - Fix wrong command for publishing of external-artifacts
Pull Request resolved: https://github.com/facebook/react-native/pull/46417
Test Plan: CI
Reviewed By: cipolleschi
Differential Revision: D62440193
Pulled By: cortinico
fbshipit-source-id: 57ea0736c1b6e3e60b048a46770356901de74024
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46413
When testing RNTester for Android during a release, we downloads the APKs from CI to save time.
Sadly, we were downloading the Release APKs instead of the Debug ones, so we could not test te integration with Metro.
This change fixes the testing scripts to download the debug APK
## Changelog
[Internal] - Download the debug APK instead of the Release one
Reviewed By: cortinico
Differential Revision: D62436023
fbshipit-source-id: 08a568caf3e5c85b9da933bc01623587bd36affe
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/46264
React-native was not in sync with metro changes that RN relies on
Changelog: [Internal]
Reviewed By: robhogan
Differential Revision: D61982240
fbshipit-source-id: 63b1f53174ab0ec663a537569a032c62c431eb83
Summary:
## Summary
There are old references to the react-native/template. This code has
moved to react-native-community/template.
Changelog: [Internal]
Pull Request resolved: https://github.com/facebook/react-native/pull/46082
Test Plan:
CI
closesfacebook/metro#1324
Reviewed By: cipolleschi
Differential Revision: D61472439
Pulled By: blakef
fbshipit-source-id: fc40145c03002a7c3117b72d07981a96aa3d8760
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45974
This change fixes the E2E tests on the template on main.
There were two issues:
1. we were forcing the project on the 0.75 branch. We now use the current branch name
2. we were replacing all the versions for the dependencies that starts with `react-native` to the monorepo version. The problem is that also `react-native-community` packages starts with `react-native`. We now changes the versions if the dependency name starts with `react-native/`.
## Changelog:
[Internal] - Fix E2E tests on main
Reviewed By: cortinico
Differential Revision: D61122154
fbshipit-source-id: 07210fc9f63e99eac46894f13c7ca5359e186e6c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45713
## Context
Running manual tests when preparing a release, it's time consuming.
We have to do the cherry picks, wait for CI to finish, and then manually test 8 configurations.
Maestro is a tool that allow us to run E2E tests automatically, and we can wire it to CI.
## Change
Add Maestro flow for a new app created from the template
Changelog:
[Internal] - Exploration to integrate maestro
Reviewed By: blakef
Differential Revision: D60282783
fbshipit-source-id: 0aa7f3fae4f5bf31518e02ddc56ca2d4fac4dfa3
Summary:
This just fixes a warning in scripts/releases-ci/__tests__/publish-updated-packages-test.js that the CI is firing on every PR
## Changelog:
[INTERNAL] - Fix warning on scripts/releases-ci/__tests__/publish-updated-packages-test.js
Pull Request resolved: https://github.com/facebook/react-native/pull/45643
Test Plan: CI
Reviewed By: blakef
Differential Revision: D60170227
Pulled By: cortinico
fbshipit-source-id: 5889f7dd530cc00651d683001e1f2624bd79c27e
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45593
I'm guessing either there is a race condition between Github removing cache entries when we're over budget OR there is an eventual consistency issue between reported cache entries and their removal. Either way, this job is best efforts. If a entry targetted for removal isn't there, great.
This change prevents the job from stopping if an entry no longer exists.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D60106847
fbshipit-source-id: 252bba7bb0bbb91d279f06a39301491332cd5ace
Summary:
In Node 20, the script to run unit tests in CI (`scripts/run-ci-javascript-tests.js`) will fail, even when all the Jest tests pass. This happens because one of the JS modules being tested is setting `process.exitCode` (see https://github.com/jestjs/jest/issues/9324#issuecomment-1808090455).
Changes:
- Modified the affected module to throw an exception when failing, instead of setting the exit code
- Adjusted the unit test for that module
## Changelog:
[General] [Fixed] - Remove setting of process.exitCode that breaks Jest tests
Pull Request resolved: https://github.com/facebook/react-native/pull/45562
Test Plan:
Before this change, running `node scripts/run-ci-javascript-tests.js` would fail with Node 20.
After this change, it succeeds.
Reviewed By: blakef
Differential Revision: D60033582
Pulled By: cipolleschi
fbshipit-source-id: 71b7f4495d414e719a9bd2d892bd1bc3045ddd5d
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45544
## This diff now does 5 things:
1. removes the old way we used `actions/setup-node` to manage the cache itself.
2. it creates a new `update-node-modules-cache` workflow, which is the only job that will update the node modules cache
3. it create a `yarn-install-with-cache` action that should be used install of directly calling `yarn install --non-interactive`. This will load a cache against a hash of `package.json`.
4. updated the cache reaper to aggressively remove everything but the latest `npm-{{ hash('package.json') }}`.
5. removed a `cache-setup`, which couldn't be used (we're using artefacts now).
## Why are we doing this:
The various `node-cache-` keys for platforms and on various branches accounts for a very large proportion of the cache (10-20%).
We don't frequently change these dependencies, and even when we do running `yarn install` after loading the cache will resolve any issues.
Limiting the cache to `main` and aggressively pruning older cache entries will clean up a lot of "small win" caching.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D59917944
fbshipit-source-id: 4be6f1959e8fde642a4f208f7d19aceba2c3262f
Summary:
This moves the `helloworld` app to build from the artifacts produced by build_npm_package so that we don't rebuild ReactNative Android from source 8 times.
It reduces build time of such jobs from 14mins to 4mins, resulting in 80mins of build time for every test_all run.
## Changelog:
[INTERNAL] - Move helloworld to build from artifacts on Android
Pull Request resolved: https://github.com/facebook/react-native/pull/45517
Test Plan: CI
Reviewed By: blakef
Differential Revision: D59957613
Pulled By: cortinico
fbshipit-source-id: b6c4adcf804af6c8d2661cf56549d037e09aa2c1
Summary:
With the recent changes to the CI, we need to update the test-e2e-local to work with the new artifacts
## Changelog:
[Internal] - Update local-e2e-test to run with the new Android Artifacts
Pull Request resolved: https://github.com/facebook/react-native/pull/45499
Test Plan: Tested locally.
Reviewed By: blakef
Differential Revision: D59902087
Pulled By: cipolleschi
fbshipit-source-id: 84ef78e8dba222bf8a9e3620632fb2a9d286d42b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45483
We don't really use this functionality and is getting harder to migrate to GHA,
hence I'm removing it.
Changelog:
[Internal] [Changed] - Remove report-app-size
Reviewed By: cipolleschi
Differential Revision: D59822862
fbshipit-source-id: 2d082454aea3b3c5863bd34556a23c2fc847f841
Summary:
I'm picking 1630b5c743 in main as it's currently missing (available only on `0.75-stable`).
## Changelog:
[INTERNAL] - Update testing scripts to work with any version of React native
Pull Request resolved: https://github.com/facebook/react-native/pull/45498
Test Plan: Nothing to test as this is a backport
Reviewed By: cipolleschi
Differential Revision: D59861440
Pulled By: cortinico
fbshipit-source-id: 57f642c66c7a6976f5a5cd53debaeb2e461a1f30
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45468
This should greatly reduce the time spent on build_npm_package
because we're moving all the publishing logic to build_android.
I need to do a bit more testing with nightlies to make sure that everything is published correctly.
Changelog:
[Internal] [Changed] - Make build_android publish to the stating repositories
Reviewed By: cipolleschi
Differential Revision: D59804015
fbshipit-source-id: be3f0b6e16f5fdbf760ec7a5e16c8e258e06dd28
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45295
When registering Babel to run RN from source, we currently call `babel/register` directly from `scripts/babel-register.js`.
This has the effect of overwriting any previous registration, which causes problems in the FB monorepo because RN also loads other projects that lie outside this registration (like Metro) from source - possibly requiring different configurations.
Moreover, if Metro is subsequently loaded from source, its own registration clobbers RN's.
Instead, this diff runs the registration through `metro-babel-register`, which maintains a cumulative list of registration directories and applies a uniform transform.
Note that this means we're not using exactly the same transform at build/publish time as for running from source - to fix that, we ought to move everything to a central `babel.config.js`, but that's a much bigger change, and this gets us close enough to unblock.
Changelog: [Internal]
Reviewed By: hoxyq
Differential Revision: D59376984
fbshipit-source-id: 0dbb00970ac87dbe40ec8904bf51ef4b1fee5e0f
Summary:
This migrates `analyse_code` to GHA into a single job called `lint`.
## Changelog:
[INTERNAL] - Migrate analyse_code to GHA
Pull Request resolved: https://github.com/facebook/react-native/pull/45247
Test Plan: CI
Reviewed By: NickGerleman
Differential Revision: D59283393
Pulled By: cortinico
fbshipit-source-id: dcdc4828a551062b3706e6450614b8c94e1a7e81
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45174
As per title, this port bck to main the changes we made in the release testing script.
## Changelog:
[Internal] - Update release testing script to work with the new template
Reviewed By: blakef
Differential Revision: D59054045
fbshipit-source-id: 0e93c2db94499407845b4fb2c98c8b44310e770f
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45175
This change ports the CI improvements we made on stable branch to main.
## Changelog:
[Internal] - Port back to main improvements we made in GHA
Reviewed By: cortinico
Differential Revision: D59053873
fbshipit-source-id: 73eb7e33b9bbdc5d8c3a9294f487ad969b144bf3
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45184
This is a follow-up to D59055522.
> NOTE:This diff will be followed up by a merge of the set-rn-version script into set-version. (I had considered a rename to version-rn-artifacts, intentionally keeping this script separate and distinct from a future [lerna version + this script] setup — however the current UX and confusion with this naming would be too confusing. It can move into a util 👍🏻.)
- Rename `set-rn-version` to `set-rn-artifacts-version` (more accurate).
- Mark this script as deprecated.
- For now, there are too many references to this script in CI test jobs to refactor away this entry point, so I am avoiding this — these should later be standardised to `set-version`.
Changelog: [Internal]
Reviewed By: christophpurrer
Differential Revision: D59058085
fbshipit-source-id: 4123ac73b5c7a2e07a1d1b6da61e0ad94fc31f84
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45180
- Simplifies the responsibilities of `scripts/releases/set-rn-version.js`.
- This no longer modifies `packages/react-native/package.json`, delegating this to `set-version`.
- Simplifies logic in `set-version`, **fixing behaviour** against deps in `packages/react-native/package.json`.
- This also acts as cleanup since D58469912 (template removal) — removing the unreferenced `update-template-package.js` util.
NOTE: This diff will be followed up by a merge of the `set-rn-version` script into `set-version`. (I had considered a rename to `version-rn-artifacts`, intentionally keeping this script separate and distinct from a future [`lerna version` + this script] setup — however the current UX and confusion with this naming would be too confusing. It can move into a util 👍🏻.)
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D59055522
fbshipit-source-id: 79b937f9e0ac790512b180ab4147aefef7f5202c
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45028
Since the addition of new workspaces to the repo which introduce interdependencies on `react-native` (`helloworld`, `react-native-test-library`), this fix is needed to preserve our current versioning strategy and bump the repo after yesterday's `0.75-stable` branch cut.
Changelog: [Internal]
Reviewed By: cipolleschi
Differential Revision: D58725561
fbshipit-source-id: ab282806560f47dc5acf7e694302ca6b85649b14
Summary:
This change splits the build step and the test step for running the test on iOS, so we can introduce a retry for the test only.
We are doing that because we have seen some flakyness in CI jobs as sometimes the simulator fails to install the app.
## Changelog:
[Internal] - Add retry to iOS tests
Pull Request resolved: https://github.com/facebook/react-native/pull/45070
Test Plan: Testing in CircleCI
Reviewed By: cortinico
Differential Revision: D58786706
Pulled By: cipolleschi
fbshipit-source-id: 61363cb86dd1a496d3595b43b6331cbee7f032ea
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/45032
Those tests haven't been running since ~1 year now.
I know it's not ideal but I'd rather remove them instead of keeping them around not executing.
We can still revert them back from the history once we decide to revive the E2E testing effort.
Changelog:
[Internal] [Changed] - Remove unused rn-tester e2e tests
Reviewed By: cipolleschi
Differential Revision: D58729123
fbshipit-source-id: f0f47e3c2e087141fdff506b7c5c9b460263721b
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44908
Changelog: [General] [Changed] - CircleCI test to Helloworld, but disabled for now until we remove the template
Reviewed By: cipolleschi
Differential Revision: D58469912
fbshipit-source-id: 718a774946bd70347697f18bbfc470b2897d2f87
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/44990
Upgrades React Native and Relay to depend on React 19, which is currently published as release candidates. This is in preparation for React Native 0.75.
This will depend on updating open source renderers after [facebook/react#29903](https://github.com/facebook/react/pull/29903) is merged.
Changelog:
[General][Changed] - Upgrade to React 19
Reviewed By: robhogan
Differential Revision: D58625271
fbshipit-source-id: f9ad95b18716a9ce02f7cfbcc7248bdfb244c010
Summary:
With the migration to GHA, we are updating the testing scripts to work with the new CI.
There are a bit of shenanigans due to:
* How GHA archives artifacts => they are all `.zip` files, so I had to play around with unzipping them
* GHA seems to create a different commit, like if it is forking the repo instead of using it. I think that it is how the checkout action works. *Note:* this might be a problem for the `Create React Native Release` workflow because it has to commit on the stable branch!
* Android is building only the simulator architecture when running from regular CI. The app is not configured to run only on that, so the RNTestProject was a failing because it was trying to build all the available architectures. It is an easy fix in the user project space when release testing.
## Changelog:
[Internal] - Update the testing script to work with the new CI
Pull Request resolved: https://github.com/facebook/react-native/pull/44923
Test Plan:
Tested locally.
* [iOS] RNTester - Hermes ✅
* [iOS] RNTester - JSC ✅
* [Android] RNTester - Hermes ✅
* [Android] RNTester - JSC ✅
* [iOS] RNTestProject - Hermes ✅ (The project is created correctly and it builds, crash at runtime for https://github.com/facebook/react-native/issues/44926)
* [iOS] RNTestProject - JSC ✅ (The project is created correctly and it builds, crash at runtime for https://github.com/facebook/react-native/issues/44926)
* [Android] RNTester - Hermes ✅ (Needed to build only the simulator architecture)
* [Android] RNTester - JSC ✅ (Needed to build only the simulator architecture)
Reviewed By: andrewdacenko
Differential Revision: D58528432
Pulled By: cipolleschi
fbshipit-source-id: 733065de4c532b13d8e95e2217f9aafd5a2ef8a0