Commit Graph

377 Commits

Author SHA1 Message Date
Christian Falch
fd1e57b0c0 moved resources to correct location (#50101)
Summary:
In the final XCFramework we no longer need to place resource bundles in a subfolder called Resources - they should be located directly in the framework folder.

This commit fixes this by removing copying to the Resources folder. I also removed a few unneeded tests since we know that we are in a valid folder at this point.

bypass-github-export-checks

## Changelog:

[INTERNAL]  - Moved resource bundles up one level

Pull Request resolved: https://github.com/facebook/react-native/pull/50101

Test Plan: Run RNTester with RCT_USE_RN_DEP=1 and verify that it launches

Reviewed By: cortinico

Differential Revision: D71464608

Pulled By: cipolleschi

fbshipit-source-id: 6cfdda0c6785ffeb13c170f9fd2dd9f5b889d490
2025-03-19 05:07:36 -07:00
Christian Falch
b7e046e345 change header structure rn deps in XCFrameworks (#50085)
Summary:
Headers are currently copied into each arch in the final xcframework. This is not necessary and will cause a lot of duplication since these files are the same for all archs.

This commit fixes this by only copying headers when we build the final XCFramework:

- ReactNativeDependencies.podspec: Changed the prepare script to be more resilient to different header structs, since we have multiple ways of packaging our tarballs locally and on the servers
- build.js: Removed copying headers when building frameworks
- compose-framework.js: Added copying headers once to the root of the XCFramework.
- rndependencies.rb: updated docs with correct ENV vars

bypass-github-export-checks

## Changelog:

[INTERNAL] - Changes the header structure in our XCFramework to avoid duplication

Pull Request resolved: https://github.com/facebook/react-native/pull/50085

Test Plan: Run RNTester with RCT_USE_RN_DEPS=1 to use prebuilt RN Deps.

Reviewed By: javache

Differential Revision: D71385183

Pulled By: cipolleschi

fbshipit-source-id: 160d56dea7f61d1b8d0a45b80f6c0789647358e6
2025-03-18 05:24:56 -07:00
Riccardo Cipolleschi
b8ab4c8d96 Connect ReactNativeDependencies with ios jobs (#49978)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49978

This change connects the RNDependencies we prebuild in CI with the other iOS jobs we have.

By doing so, we aim to speed up the build time in CI, saving time and money.

## Changelog:
[Internal] - Connect the ReactNativeDependencies in CI

Reviewed By: cortinico

Differential Revision: D71034587

fbshipit-source-id: 14f1237f4fb57ee103a80be1718042d66ff7b0d7
2025-03-13 08:40:14 -07:00
Christian Falch
e876e4926f Improve RCT-Folly so that other dependencies don't have to specify the folly flags (#49969)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49969

Improved RCT-Folly podspec by configuring it as a prepare step, so that we don't need to forward the folly flags to all the others pods and to 3rd party dependencies.

## Changelog:

[INTERNAL] - Configure folly in a prepare step

Test Plan:
 Run Rn-Tester and  verify that it works as expected both building deps from source and using prebuilt tarballs
 Add third-party library (react-native-reanimated) and perform the same tests to verify that it works with the changed podspec and utilities

Reviewed By: javache

Differential Revision: D71032640

Pulled By: cipolleschi

fbshipit-source-id: a34a9b38fa5d5b37a0a193a73659f0d45dd3d660
2025-03-13 08:40:14 -07:00
Riccardo Cipolleschi
10bbdb8679 Fix verifyReleaseOnNPM by dropping the v in the version (#49944)
Summary:
GHA passes the version to the script with a `v` prefix. However, when we receive the version from NPM, the `v` prefix is not here.
We can fix the script by dropping the `v` when it is passed to the function.

bypass-github-export-checks

## Changelog:
[Internal] - Fix verifyPackageOnNPM

Pull Request resolved: https://github.com/facebook/react-native/pull/49944

Test Plan: GHA

Reviewed By: cortinico, fabriziocucci

Differential Revision: D70960414

Pulled By: cipolleschi

fbshipit-source-id: 4234103ebe49cf715aea4a1473a8a60978f07a9f
2025-03-11 04:05:11 -07:00
Riccardo Cipolleschi
b33bc012dc Add step to sign the XCFramework in CI (#49871)
Summary:
This PR adds a step in CI to sign the xcframework if we have a certificate available
bypass-github-export-checks
## Changelog:
[Internal] - Sign XCFrameworks in CI

Pull Request resolved: https://github.com/facebook/react-native/pull/49871

Test Plan: GHA

Reviewed By: cortinico

Differential Revision: D70734340

Pulled By: cipolleschi

fbshipit-source-id: 244422bdf9a8e0a2075a727a91805f762d4f95c9
2025-03-07 04:28:07 -08:00
Fabrizio Cucci
a58aae46df Fix destructuring error in Verify Release is on NPM step
Summary:
Found this issue while releasing 0.79.0-rc.0 (see [job](https://github.com/facebook/react-native/actions/runs/13649159968/job/38156418752)).

bypass-github-export-checks

```
SyntaxError: Invalid destructuring assignment target
    at new AsyncFunction (<anonymous>)
    at callAsyncFunction (/__w/_actions/actions/github-script/v6/dist/index.js:15143:16)
    at main (/__w/_actions/actions/github-script/v6/dist/index.js:15236:26)
    at /__w/_actions/actions/github-script/v6/dist/index.js:15217:1
    at /__w/_actions/actions/github-script/v6/dist/index.js:15268:3
    at Object.<anonymous> (/__w/_actions/actions/github-script/v6/dist/index.js:15271:12)
    at Module._compile (node:internal/modules/cjs/loader:1469:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1548:10)
    at Module.load (node:internal/modules/cjs/loader:1288:32)
    at Module._load (node:internal/modules/cjs/loader:1104:12)
```

## Changelog:
[Internal] -

Reviewed By: cipolleschi

Differential Revision: D70552301

fbshipit-source-id: b50e3d76c7497cc218e379400d5870531669abe1
2025-03-04 03:17:46 -08:00
Riccardo Cipolleschi
42052940ea Fix caches for RNTester (#49791)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49791

The cache for RNTester is broken because the matrix parameters used to test RNTester are not part of the job_id that is used to create the cache keys to restore the Podfile.lock.

This means that we have a race condition on which job of the matrix manages to save the cache. However, those caches are not always valid for the other jobs that presents different matrix parameters.

This change should fix the issue.

## Changelog:
[Internal] - Fix test-rn-tester cache Cache

Reviewed By: cortinico

Differential Revision: D70493507

fbshipit-source-id: 1db6e00507b3e9abe4400831ee1b048c620b9102
2025-03-03 09:05:28 -08:00
Riccardo Cipolleschi
70c3b2dcff Fix release scripts to check npm packages (#49788)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49788

Release of 0.78 was successful but it failed to verify the package of NPM because of some error in the JS files.

Preparing for 0.79, I discovered some other issues in the NPM checking scripts.

This change should fix them.

## Changelog:
[Internal] - Fix publishing scripts

Reviewed By: fabriziocucci

Differential Revision: D70489717

fbshipit-source-id: 02a37d9a86fe108c7f7d2d634b8c0727dabb153d
2025-03-03 06:54:54 -08:00
Riccardo Cipolleschi
7ccb1e1fb0 Avoid the creation of separate folders for separate artifacts (#49760)
Summary:
When downloading artifacts using a pattern, GHA, by default, creates a folder for each artifacts and copies the artifacts in that folder.
This breaks the maven publishing which expects the artifacts in the `artifact` folder and not i a subfolder.

The `merge-multiple` option allow for the artifacts to be downloaded in the specified folder, without the extra folder in the path

## Changelog:
[Internal] - Avoid the creation of intermediate folder when downloading the artifacts

Pull Request resolved: https://github.com/facebook/react-native/pull/49760

Test Plan:
GHA

<img width="791" alt="Screenshot 2025-03-02 at 11 08 33" src="https://github.com/user-attachments/assets/cfc85b27-117f-4d21-97ef-67493615a5a1" />

Reviewed By: fabriziocucci

Differential Revision: D70462254

Pulled By: cipolleschi

fbshipit-source-id: ed310a90bcdea55e466d4d71942a25abc6e6986a
2025-03-03 02:10:15 -08:00
Riccardo Cipolleschi
42a7c62a6a Ensure that the artifacts have the right extension (#49755)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49755

The artifacts are uploaded without the .tar.gz extension and the gradle script fails to upload them to sonatype.

This change adds the extensions.

## Changelog:
[Internal] -

Reviewed By: sammy-SC

Differential Revision: D70443149

fbshipit-source-id: c16d1842688b82ac216ffb90ecf2b75f562cca64
2025-03-01 13:05:59 -08:00
Riccardo Cipolleschi
0bb6243550 Compress xcframework to let sonatype sign it (#49753)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49753

Sonatype cannot sign folders. It needs a file to be signed.
To make it happen, we are compressing the xcframeworks and the dSYM with tar, and we are uploading those files instead of the folders

I also observed that the cache keys were not computed correctly, so I'm fixing them.

## Changelog:
[Internal] - use tar.gz instad of folders for dSYM and xcframeworks

Reviewed By: bvanderhoof, mofeiZ

Differential Revision: D70409314

fbshipit-source-id: 20a5ee4f24b644f4f087974ad6b0831d5769b1d9
2025-02-28 14:00:43 -08:00
Riccardo Cipolleschi
33c0112b63 Configure gradle to publish RNDependencies to Maven (#49749)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49749

This change configures gradle and CI to properly publish the RNDependencies artifacts to Maven Central

## Changelog
[Internal] - Configure gradle to publish on Maven Central

Reviewed By: cortinico

Differential Revision: D70390191

fbshipit-source-id: fc1e1070325240584cb07fb17e58118c4c583fa9
2025-02-28 09:05:37 -08:00
Riccardo Cipolleschi
c99b2a4854 Connect the prebuild-ios workflow with other workflows (#49731)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49731

This change runs the prebuilds in all the workflows we need:
- test-all
- nightlies
- create-release

## Changelog:
[Internal] - connect the rebuild-ios workflow with the other workflows

Reviewed By: cortinico

Differential Revision: D70331579

fbshipit-source-id: 6505a32672d43d06e29e68d37bd0ceff21bd7386
2025-02-28 09:05:37 -08:00
Riccardo Cipolleschi
2ff0220c8e Add job to build the XCFramework for ios prebuilds (#49563)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49563

This change introduces a job to prebuild iOS XCFrameworks.

## Changelog:
[Internal] - Create prepare artifacts workflows

Reviewed By: cortinico

Differential Revision: D69924325

fbshipit-source-id: f2241b1db715ae7c42ce32eda55a54efa6985a9d
2025-02-28 09:05:37 -08:00
Riccardo Cipolleschi
da88bf0030 Add job to build the slices for ios prebuilds (#49528)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49528

This change introduces a job to prebuild iOS slices.

## Changelog:
[Internal] - Create prepare artifacts workflows

Reviewed By: cortinico

Differential Revision: D69855542

fbshipit-source-id: 54d5b24b55f9e7bebdbb201073524dc4f3748e07
2025-02-28 09:05:37 -08:00
Riccardo Cipolleschi
3c03e2b9f5 Add prepare prebuild reusable workflow (#49530)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49530

This change introduces the workflow to prebuild iOS artifacts.

This will be a reusable workflow, so we can then call it as it is from test-all, nightlies and publish-release

## Changelog:
[Internal] - Create prepare artifacts workflows

Reviewed By: cortinico

Differential Revision: D69854568

fbshipit-source-id: 5dc532fa564fe7e0987ba5d133da42e04237c3cc
2025-02-28 09:05:37 -08:00
Nicola Corti
c4e952ea84 Temporarily disable Configuration Caching on CI (#49742)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49742

Seems like publishing jobs are not happy with Gradle Config Caching.
I'm disabling it for now till we find out what's the root cause.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D70385662

fbshipit-source-id: 532c46ea1e578bab5f3e5d6814a7f7193e67a7ad
2025-02-28 04:25:58 -08:00
Nicola Corti
1fd3806ee9 Bump Node 18 -> 20 to build React Native in OSS (#49658)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49658

This bumps the version of Node that we use to build React Native from 18 to 20.
We'll still be supporting building with 20, but we'll moving our toolchain to Node 20 becuase 18 is at EOL soon.

Changelog:
[General] [Changed] - Bump Node 18 -> 20 to build React Native in OSS

Reviewed By: javache, cipolleschi

Differential Revision: D70168003

fbshipit-source-id: b64ee583b2d2e72d25393119ae9e9029a74d5b13
2025-02-26 04:08:12 -08:00
Nicola Corti
e49f2d5c50 Enable Gradle Configuration Caching on CI (#49514)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49514

This attemps to enable Config Caching on CI. I'm curious to see how much time this is going to save.
There might be some problems with nigthlies so I want to make sure this is running for some days before the branch cut.

Changelog:
[Internal] [Changed] -

Reviewed By: NickGerleman

Differential Revision: D69846848

fbshipit-source-id: 0d5c292e65a6107df62f6494a1aae9abd0e8b6cc
2025-02-20 02:42:24 -08:00
shubhamguptadream11
dc02c53c16 fix: cron timing updated and action upgrade (#49407)
Summary:
Problem: Duplicate issues were notified on discord channel in issue triaging section.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [FIXED] - Changed cron timings to run at fix schedule and upgraded action for better debugging

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->
[GENERAL] [FIXED] - Changed cron timings to run at fix schedule and upgraded action for better debugging

Root cause:
- The cron job (cron: "0 /6 * *") is expected to run every 6 hours.
- Expected runs: 5:54 AM → 11:54 AM → 5:54 PM.
- However, the second run happened earlier at 11:37 AM instead of 11:54 AM.
- This caused duplicate pings for issues created around 5:42:24 AM.

Pull Request resolved: https://github.com/facebook/react-native/pull/49407

Test Plan: Tested action locally

Reviewed By: cortinico, NickGerleman

Differential Revision: D69667174

Pulled By: cipolleschi

fbshipit-source-id: 3dcadc25783335c32cba8acdda26e1c755294629
2025-02-17 02:12:49 -08:00
Nicola Corti
6c3c8b7ca3 Do not reference react-native info in the Issue Template (#49367)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49367

Users should use `npx react-native-community/cli info` instead.
This updates the issue template.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D69533810

fbshipit-source-id: 7fd1718c96f1b160ed53cd17752f64d887143662
2025-02-13 07:37:00 -08:00
Nicola Corti
d11f622699 monitor-new-issues should ping the Issue Triager Oncall (#49359)
Summary:
This updates the Issue Triaging bot to ping the oncall

## Changelog:

[INTERNAL] -

Pull Request resolved: https://github.com/facebook/react-native/pull/49359

Test Plan: Nothing to test

Reviewed By: cipolleschi

Differential Revision: D69527137

Pulled By: cortinico

fbshipit-source-id: 7291054a734bf9f7240002773b716b2057aa8eca
2025-02-12 08:15:43 -08:00
Rob Hogan
47a21740cd Scripts: remove checked-in debugger; statements (#49289)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49289

These snuck in, presumably accidentally, via https://github.com/facebook/react-native/pull/49164.

This interferes with running test suites with a debugger connected (e.g, when debugging Jest itself).

(Aside: we should probably enable [`eslint/no-debugger`](https://eslint.org/docs/latest/rules/no-debugger) to catch these)

Changelog: [Internal]

Reviewed By: hoxyq

Differential Revision: D69377992

fbshipit-source-id: 5d51d18be76f9b01852b2e5b7297b95452f36d55
2025-02-10 00:52:43 -08:00
shubhamguptadream11
ea876054cf feat: added new workflow for issue monitoring in react native (#49225)
Summary:
While triaging issues in the React Native repository, we face two major challenges:

- Missing Issues: The large volume of issues makes it difficult to ensure that none are overlooked.
- Ownership: There is no structured process to determine who should handle which issue.

To address these challenges, we are setting up this action.

## Changelog:

<!-- Help reviewers and the release process by writing your own changelog entry.

Pick one each for the category and type tags:

[GENERAL] [ADDED] - Added a new workflow to monitor new issue in repo.

For more details, see:
https://reactnative.dev/contributing/changelogs-in-pull-requests
-->

Here we are using this github action: https://github.com/react-native-community/repo-monitor to monitor new issues and then notify it on specific discord server to notify someone.

Currently this action runs every 6 hours.

Requirements:
- We need following inputs to make this workflow run:
   -  `DISCORD_WEBHOOK_URL` to be added in secrets [Needed for posting message in specific channels]
   -  `role_id`: To notify a group.

Pull Request resolved: https://github.com/facebook/react-native/pull/49225

Test Plan: NA

Reviewed By: cipolleschi

Differential Revision: D69254130

Pulled By: cortinico

fbshipit-source-id: 43a57f8f3bf161042a9432d02f292896ea8f7622
2025-02-06 13:15:29 -08:00
Riccardo Cipolleschi
9d4c4b2741 Fix typo in verifyReleaseOnNPM-test file (#49207)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49207

Renamed `verifyReleaseOnNPM-test` to `verifyRNReleaseOnNpm-test`.

## Changelog:
[Internal] - rename a test file for CI script

Reviewed By: huntie

Differential Revision: D69183614

fbshipit-source-id: 7a2c2804617f380758a53438598bb6fe0e27e68d
2025-02-06 03:39:15 -08:00
Riccardo Cipolleschi
1dd464d84e Remove last remnant of CircleCI from CI scripts (#49201)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49201

There are some leftover references to CircleCI in these scripts. Let's remove it.

## Changelog:
[Internal] - Remove remaining CircleCI references from CI scripts

Reviewed By: huntie

Differential Revision: D69182535

fbshipit-source-id: 4e825b65b5f5ca6ce16f5c7ac2f79088cf2d1ace
2025-02-05 09:55:00 -08:00
Nicola Corti
c4822419c4 Add retry to yarn-install step (#49199)
Summary:
`yarn install` is failing sporadically with a 500. This should mitigate this flakyness.

## Changelog:

[INTERNAL] -

Pull Request resolved: https://github.com/facebook/react-native/pull/49199

Test Plan: CI

Reviewed By: rubennorte

Differential Revision: D69180877

Pulled By: cortinico

fbshipit-source-id: 5276e2744c73df896b4bcadfecf3db61d57d198c
2025-02-05 06:43:39 -08:00
Riccardo Cipolleschi
a52f5514ed Automate the check for the Release on NPM (#49164)
Summary:
One of the steps we perform when doing a release is to run `npm view react-native` to verify that the release has been published and it is available with the right tag.
As of today, we check this manually.

This change aims at automating this check so that we don't have to do it manually ourselves.

## Changelog:
[Internal] - Releases: automate the npm view check

Pull Request resolved: https://github.com/facebook/react-native/pull/49164

Test Plan:
Created a veriftyReleaseOnNPM-tests.js jest test to verify that the script works fine.

<img width="667" alt="Screenshot 2025-02-04 at 15 18 24" src="https://github.com/user-attachments/assets/cf08155f-80da-4e15-a922-5c16f3fd806e" />

Reviewed By: cortinico

Differential Revision: D69118622

Pulled By: cipolleschi

fbshipit-source-id: a8d40cd2fcb164d8f7174de680b340510f3e8551
2025-02-05 06:33:57 -08:00
Nicola Corti
b345cecaaa Centralize yarn install to use actions/yarn-install (#49174)
Summary:
This centralizes the invocation of yarn install to be via the `actions/yarn-install`.
It will make it easier to add a retry if we want for all the `yarn install` steps in all the workflows.

## Changelog:

[INTERNAL] -

Pull Request resolved: https://github.com/facebook/react-native/pull/49174

Test Plan: CI

Reviewed By: NickGerleman

Differential Revision: D69121525

Pulled By: cortinico

fbshipit-source-id: 135da2e172cdf95b2a0ef8fd3d25996ab9317167
2025-02-04 21:12:19 -08:00
Riccardo Cipolleschi
ae7175d0ab Move analisys scripts to .github folder (#49123)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/49123

Previously, we used to have CI workflows scripts in a `react-native/scripts/circleci` folder.
Now that we are not using CircleCI anymore, we move those scripts to the `.github/workflow-scripts` folder.

## Changelog:
[Internal] - Move ci scripts to the `.github/workflow-scripts` folder

Reviewed By: cortinico, huntie

Differential Revision: D69047581

fbshipit-source-id: 6a5d8525e526cc7521d42e2be9530deb09914fdc
2025-02-03 10:02:19 -08:00
Nicola Corti
de5bccf080 Cleanup prealpha logic from the JS Publishing Scripts (#48691)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48691

We don't intent to use the prealpha logic in the near future so it makes sense to remove it for
to simplify our already complicated release process. We can always revive it if we wish.

Changelog:
[Internal] [Changed] -

Reviewed By: cipolleschi

Differential Revision: D68206014

fbshipit-source-id: f05eeae3997d52df1127852e03437a387a01f5ad
2025-01-16 11:36:42 -08:00
Riccardo Cipolleschi
559d070e8e Use RNTester App downloaded from CI instead of building (#48637)
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
2025-01-15 01:04:29 -08:00
Riccardo Cipolleschi
b3648be84f Bump maestro to see if it improves stability (#48677)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48677

E2E tests are flaky again.
Let's bump maestro to see if stability improves.

This will also remove some noise from the logs, make them easier to read.

## Changelog
[Internal] - Bump maestro version

Reviewed By: cortinico

Differential Revision: D68160005

fbshipit-source-id: 40a25f974dfda75785bf08d8d236e771b44d13cf
2025-01-14 13:32:51 -08:00
Riccardo Cipolleschi
f44ff97c47 Properly test JSC for template_app e2e tests (#48656)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48656

While working on 0.78, I realize we were not testing the template app with JSC.

This change should fix this.

## Changelog:
[Internal] - Disable Hermes for the JSC E2E tests with Maestro

Reviewed By: cortinico, fabriziocucci

Differential Revision: D68147849

fbshipit-source-id: 4fbe005b5d04d6163a37041d1bd57fd48a9dfda8
2025-01-14 08:11:25 -08:00
Nicola Corti
b7eccf23de Back out "Do not reset rn-artifacts-version on release branch" (#48651)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48651

Original commit changeset: dace7c931ec3

Original Phabricator Diff: D67975049

Reviewed By: cipolleschi

Differential Revision: D68114130

fbshipit-source-id: 9fb1707191037127b9ae985d2e3298a64e911590
2025-01-14 07:09:27 -08:00
Nicola Corti
a28d3961bd Do not reset rn-artifacts-version on release branch (#48572)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48572

Because of this extra step on build-android, we're seeing the version 1000.0.0-<SHA>
on commits on the release branch. This prevents it.

Changelog:
[Internal] [Changed] - Do not reset rn-artifacts-version on release branch

Reviewed By: cipolleschi

Differential Revision: D67975049

fbshipit-source-id: dace7c931ec310538c11c4b9e544fdc2241a1d0c
2025-01-10 03:44:04 -08:00
Riccardo Cipolleschi
23780f8cb7 Use the app artifact in E2E tests (#48469)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48469

This change downloads the generated artifact and uses it in the E2E tests

## Context

While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration.

I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps:

1. make sure we build all the variants we need
2. store the .app file as an artifact
3. download the artifact and use it in the E2E tests

## Changelog:
[Internal] - Build release variant for RNTester

Reviewed By: mdvacca

Differential Revision: D67800932

fbshipit-source-id: 6f3c8bbc42ad95cabab85dafff00e233a936d136
2025-01-04 09:02:17 -08:00
Riccardo Cipolleschi
9bf7aff882 Fix code to record and upload videos (#48444)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48444

While debugging why the Debug variant was failing, I realised that the code to store video artifacts and the code to record the videos were not working properly.

This diff fixes that

## Context

While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration.

I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps:

1. make sure we build all the variants we need
2. store the .app file as an artifact
3. download the artifact and use it in the E2E tests

## Changelog:
[Internal] - Build release variant for RNTester

Reviewed By: mdvacca

Differential Revision: D67760436

fbshipit-source-id: ee4b034f7c54cbf0b46c0afc16c31389b11353fe
2025-01-04 09:02:17 -08:00
Riccardo Cipolleschi
3d2e5447be Store the RNTester artifacts to speed-up E2E (#48442)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48442

This change stores the RNTester `.app` in an artifact so that E2E tests can reuse it.

## Context

While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration.

I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps:

1. make sure we build all the variants we need
2. store the .app file as an artifact
3. download the artifact and use it in the E2E tests

## Changelog:
[Internal] - Build release variant for RNTester

Reviewed By: mdvacca

Differential Revision: D67760380

fbshipit-source-id: 8be0bbbadf4240dce1bcf5b44dadb41d49ed4c06
2025-01-04 09:02:17 -08:00
Riccardo Cipolleschi
2c338a719e Build Release version for RNTester to speed-up E2E (#48443)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48443

This change makes sure we build the Release variant of RNTester so we can store the generated app as an artifact and forward it to the E2E tests.

## Context

While looking at the recent failures of the E2E tests, I realized that the Hermes, NewArch, Debug variant often fails to build, not to test, for some misconfiguration.

I also realized that we are already building that varaint successfully once, so why not reuse it? To reuse prebuilds, we need a few steps:

1. make sure we build all the variants we need
2. store the .app file as an artifact
3. download the artifact and use it in the E2E tests

## Changelog:
[Internal] - Build release variant for RNTester

Reviewed By: cortinico

Differential Revision: D67760372

fbshipit-source-id: 02cc9ec64d5a7b4fa2ad05bca6aa91a69b2b5907
2025-01-02 09:52:22 -08:00
Riccardo Cipolleschi
93117ea1b8 Move E2E scripts to js (#48419)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48419

This change moves the E2E scripts for iOS to a JS script.
This should make it much easier to modify the code in case we need to change it.

## Changelog
[Internal] - Move e2e script from bash to JS

Reviewed By: cortinico

Differential Revision: D67737950

fbshipit-source-id: d0b0411c8a4d688c10e460e70b11dbfc83aaa135
2024-12-31 09:21:18 -08:00
Riccardo Cipolleschi
9ceabd341d Fix iOS E2E Tests (#48400)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48400

A couple of days ago, the iOS CI started failing for the E2E tests on main.
This is because We were not using the hermes artifacts we were preconfiguring.

In fact, this is the log of the `test_e2e_ios_rntester`, which is not using the prebuilt.
{F1974129000}

For comparison, this is the `test_ios_rntester`, which is using the prebuilt
{F1974129001}

While investigating why this was happening, I realized that we were not testing the old architecture anymore, because we forget to update the script after the release of the New Architecture.

This change should fix both.

## Changelog:
[Internal] - Fix E2E tests for iOS and test the Old Arch

Reviewed By: robhogan

Differential Revision: D67670976

fbshipit-source-id: 7d1383a89e06c138f437a9c5f876a2e900878fb0
2024-12-27 07:38:47 -08:00
Riccardo Cipolleschi
4a667e1a50 Set timeout for E2E tests. (#48381)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48381

Right now, the E2E tests for RNTester does not have a timeout.
It can happen that the emulator get stuck and the action times out.

The default timeout is 6 hours, which is definitely too much and wasteful, so let's reduce it to 1 hour.

{F1974112110}

## Changelog:
[Internal] - Set timeout for E2E tests to 1 hour

Reviewed By: robhogan, blakef

Differential Revision: D67620423

fbshipit-source-id: c507d1222fca49287fafe6da4bffe559d8687b99
2024-12-24 08:15:22 -08:00
Riccardo Cipolleschi
e87296f356 Do not install jq as it is already installed (#48363)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48363

jq is already installed on M1 machines on GithubActions. There is no need to install it again and this is outputting a warning in CI:

{F1974100065}

## Changelog:
[Internal] - Do not install jq as it is already installed

Reviewed By: blakef

Differential Revision: D67599961

fbshipit-source-id: 1f621f796b0c67ec877fc35269137537618f47ae
2024-12-23 07:46:02 -08:00
Riccardo Cipolleschi
5b6534e727 Fix typo in configuration (#48364)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48364

The configuration to run E2E tests on maestro has a typo that was outputting a warning in CI:

{F1974100056}

## Changelog
[Internal] - Fix typo on E2E test configuration

Reviewed By: robhogan

Differential Revision: D67599849

fbshipit-source-id: 9504f821172782e188ff524176bc4c2ec48dea97
2024-12-23 07:46:02 -08:00
Riccardo Cipolleschi
953889da51 Stabilize Android tests adding retries for failed tests (#48324)
Summary:
Sometimes, specific E2E tests can fail. This change tries to run specific E2E tests with retries, to compensate for their flakyness.

## Changelog:
[Internal] - Add single test retry for Android E2E tests

Pull Request resolved: https://github.com/facebook/react-native/pull/48324

Test Plan: GHA

Reviewed By: huntie

Differential Revision: D67396758

Pulled By: cipolleschi

fbshipit-source-id: 7d806fe7354bd9e826c591ea9628c73c3b258fce
2024-12-20 06:19:17 -08:00
Riccardo Cipolleschi
03b9f041db Improve E2E Stability for Android (#48286)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48286

This change bumps the specs for the Android E2E tests. This has been reported to improve the stability of the tests.

We need to keep part of the `flatlist.yml` commented as it creates an issue with Maestro as it takes too much memory.

I'll reach out to the people working on Maestro to try and understand what's going on there.

## Changelog:
[Internal] - Improve android Stability and reenable E2E tests on main

Reviewed By: fabriziocucci

Differential Revision: D67276601

fbshipit-source-id: 7cca253547063a0ec39da7de58806286c6632b07
2024-12-17 03:45:18 -08:00
Riccardo Cipolleschi
3f3ff554bc Bump Android executor and add timeout (#48280)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48280

In an attempt to improve times and stability, I bumped the android machine to an ubuntu with 4 cores.

Sometimes the emulator can hang, so i set a timeout for the E2E tests executions of 1 hours to avoid wasting money in CI

## Changelog
[Internal] - Bump Android machine and add timeout

Reviewed By: fabriziocucci

Differential Revision: D67273842

fbshipit-source-id: b7212f52016f8ead1dbb2b4da03cb6f564222893
2024-12-17 03:45:18 -08:00
Riccardo Cipolleschi
4c4c87beaf Improve metro waiting times in E2E (#48281)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48281

While working on Maestro E2E I realized that we were waiting for Metro to start even when metro was not running.

This moves the waiting only when metro is actually started.

I also added another waiting point as it takes several seconds for the app to load the bundle from metro the first time. Subsequent attempts are faster as the metro cache is warm.

## Changelog:
[Internal] - Improve metro waiting times in E2E

Reviewed By: fabriziocucci

Differential Revision: D67273648

fbshipit-source-id: 912be4d14869c8ce87d7c4e4f7ee37b643f5845c
2024-12-17 03:45:18 -08:00