6 Commits

Author SHA1 Message Date
Nicola Corti
a7a51275b5 Do not setup-node twice in test_js (#52737)
Summary:
I've noticed that test_js (20) and test_js (24) are actually running on Node 22.
That's because the `yarn-install` action is invoking setup-node again with the default value (22).

This changes it. Also I'm cleaning up the workflows so that every `yarn-install` invocation is happening just after the `setup-node` invocation.

## Changelog:

[INTERNAL] -

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

Test Plan: CI which will most likely be red for test_js (20) so will need a follow-up

Reviewed By: cipolleschi

Differential Revision: D78664671

Pulled By: cortinico

fbshipit-source-id: c73390930d1511d1bf0f2d4ea92e83f50b10247f
2025-07-21 08:51:05 -07:00
Fabrizio Cucci
5baf1e6d00 Fix all workflows to use node 22.14.0 (#52491)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/52491

We hit this error when trying to release 0.81.0 (see [action run](https://github.com/facebook/react-native/actions/runs/16147471618/job/45570030039)):

> error react-native/metro-babel-transformer@0.81.0-main: The engine "node" is incompatible with this module. Expected version ">= 22.14.0". Got "20.19.2"

This should fix the issue.

Changelog: [Internal]

Reviewed By: motiz88, cortinico

Differential Revision: D77938906

fbshipit-source-id: 48ca412f05d99459c4386499330584d9e560408b
2025-07-08 09:24:15 -07:00
Rubén Norte
2c79c70c3b Downgrade markdownlint-rule-relative-links to v3 to avoid yarn errors with incompatible engines (#50625)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50625

Changelog: [internal]

This fixes yarn install errors coming from repositories other than `react-native` where `--ignore-engines` isn't specified. This was caused by `markdownlint-rule-relative-links` requiring Node.js >= v22 when we're using v20 in most cases.

Fixes https://github.com/react-native-community/docker-android/actions/runs/14380730414/job/40323632337?pr=234

Reviewed By: cortinico

Differential Revision: D72789007

fbshipit-source-id: 2c0b161af8be8d37bf57a7ea9cc22023434d4cb2
2025-04-10 09:44:11 -07:00
Rubén Norte
33f4d49dcf Add linting for markdown with markdownlint (#50591)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/50591

Changelog: [internal]

This implements linting for Markdown files in React Native via `markdownlint`. We already have Prettier support for Markdown, but this adds some missing functionality, especially validation of local links.

Reviewed By: cortinico

Differential Revision: D72649666

fbshipit-source-id: 5e2c369332b270850d6d04d8960e6ce717f5ba7a
2025-04-09 10:21:03 -07: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
Nick Gerleman
a28867f952 Remove home-rolled yarn caching (#48237)
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/48237

Noticed this when trying to diagnose what seemed like a stale caching issue. It effectively reverts D59917944.

D59917944 added logic to only do yarn caching on main, but it has some correctness issues:
1. We cache `node_modules` instead of the yarn cache, which may contain e.g. build artifacts, or other scratch/cache files written (such as anything that writes to `node_modules/.cache`). We really want to be caching the yarn cache, which has pristine packages before install, which I think it will also need to perform the real install anyways.
2. We key the cache on root `package.json`, which is missing a lot of information (both provided by the other `package.json` in the repo, but mostly, the lockfile resolution).

We only save cache when we're on `refs/heads/main` (so continuous builds against main), and supposedly, builds against base branch should be able to restore against those, but recent PR jobs I have seen, where `package.json` has not changed, all have `Cache not found for input keys: node-modules-068350889e87919c1c6c2c220c8d2d92db13f38820bf2efb315d1274b97bc367`

Because of the potential correctness issues, and that the strategy for limiting to main seemingly is not allowing cache to be used in PR, this diff goes back to previous solution, which may store more artifacts (but working cache should also reduce cost by making jobs run faster).

Changelog: [Internal]

Reviewed By: cipolleschi

Differential Revision: D67140004

fbshipit-source-id: f74074a498af56b1837fa23cf80795f76935b762
2024-12-12 09:13:52 -08:00