react-native/scripts
Blake Friedman 4410899ec7 Only cache node_modules on main (#45544)
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
2024-07-19 13:04:07 -07:00
..
__tests__ Move all package.json updates into set-version script (#45180) 2024-06-26 07:59:49 -07:00
build Use metro-babel-register for additive Babel registration (#45295) 2024-07-05 04:48:30 -07:00
circleci Remove report-app-size (#45483) 2024-07-18 04:34:32 -07:00
debugger-frontend Add --create-diff mode to debugger-frontend sync script (#43621) 2024-03-22 12:11:48 -07:00
e2e Move helloworld to build from artifacts on Android (#45517) 2024-07-19 08:55:19 -07:00
monorepo Remove bump-all-updated-packages script (#43534) 2024-03-19 07:05:03 -07:00
release-testing Move helloworld to build from artifacts on Android (#45517) 2024-07-19 08:55:19 -07:00
releases fix linting noise (#45465) 2024-07-17 10:07:00 -07:00
releases-ci Make build_android publish to the staging repositories (#45468) 2024-07-16 13:58:43 -07:00
utils Port changes in the release testing script from the release branch (#45174) 2024-06-27 04:11:44 -07:00
.tests.env
clean-gha-cache.js Only cache node_modules on main (#45544) 2024-07-19 13:04:07 -07:00
consts.js Fix RNTester Podfile.lock update in release workflow (#43513) 2024-03-15 10:32:07 -07:00
lint-java.js
npm-utils.js Move all package.json updates into set-version script (#45180) 2024-06-26 07:59:49 -07:00
objc-test.sh Port CI improvements from Release branch to main (#45175) 2024-06-27 04:11:44 -07:00
process-podspecs.sh
run-ci-javascript-tests.js RN: Fix Open Source Test Scripts 2024-03-29 01:42:24 -07:00
scm-utils.js Enable Flow on misc release scripts (#42736) 2024-01-31 03:36:02 -08:00
sync-css-layout.sh
validate-ios-test-env.sh