mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
Add workspaces hash to yarn cache key (#20154)
* Add branch to yarn cache key * Add checksum check for workspace info * Fix yaml * Try moving the command * How about here * Just inline it * i hate it here * try reverting back * Add run * idk * try inlining the command everywhere * Create workspace_info.txt when we create the cache * Delete the timestamp
This commit is contained in:
parent
31d096605c
commit
6b28eb6175
|
|
@ -16,7 +16,7 @@ aliases:
|
|||
restore_cache:
|
||||
name: Restore node_modules cache
|
||||
keys:
|
||||
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-node-modules
|
||||
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "workspace_info.txt" }}-node-modules
|
||||
|
||||
- &TEST_PARALLELISM 20
|
||||
|
||||
|
|
@ -29,6 +29,7 @@ aliases:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: node ./scripts/rollup/consolidateBundleSizes.js
|
||||
- run: ./scripts/circleci/pack_and_store_artifact.sh
|
||||
|
|
@ -51,7 +52,6 @@ jobs:
|
|||
setup:
|
||||
docker: *docker
|
||||
environment: *environment
|
||||
|
||||
steps:
|
||||
- checkout
|
||||
- run:
|
||||
|
|
@ -61,6 +61,7 @@ jobs:
|
|||
- run:
|
||||
name: Install Packages
|
||||
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- save_cache:
|
||||
# Store the yarn cache globally for all lock files with this same
|
||||
# checksum. This will speed up the setup job for all PRs where the
|
||||
|
|
@ -75,7 +76,7 @@ jobs:
|
|||
# all jobs run on this branch with the same lockfile.
|
||||
name: Save node_modules cache
|
||||
# This cache key is per branch, a yarn install in setup is required.
|
||||
key: v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-node-modules
|
||||
key: v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-{{ checksum "workspace_info.txt" }}-node-modules
|
||||
paths:
|
||||
- node_modules
|
||||
|
||||
|
|
@ -85,6 +86,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: node ./scripts/prettier/index
|
||||
- run: node ./scripts/tasks/eslint
|
||||
|
|
@ -98,6 +100,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: node ./scripts/tasks/flow-ci
|
||||
|
||||
|
|
@ -108,6 +111,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-stable --ci
|
||||
|
||||
|
|
@ -117,6 +121,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test --ci
|
||||
|
||||
|
|
@ -126,6 +131,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-classic --ci
|
||||
|
||||
|
|
@ -135,6 +141,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-classic --variant --ci
|
||||
|
||||
|
|
@ -144,6 +151,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-classic --prod --ci
|
||||
|
||||
|
|
@ -153,6 +161,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-classic --prod --variant --ci
|
||||
|
||||
|
|
@ -162,6 +171,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-www --ci
|
||||
|
||||
|
|
@ -171,6 +181,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-www --variant --ci
|
||||
|
||||
|
|
@ -180,6 +191,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-www --prod --ci
|
||||
|
||||
|
|
@ -189,6 +201,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-www --prod --variant --ci
|
||||
|
||||
|
|
@ -199,6 +212,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-stable --persistent --ci
|
||||
|
||||
|
|
@ -209,6 +223,7 @@ jobs:
|
|||
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-stable --prod --ci
|
||||
|
||||
|
|
@ -218,6 +233,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test --prod --ci
|
||||
|
||||
|
|
@ -227,6 +243,7 @@ jobs:
|
|||
parallelism: *TEST_PARALLELISM
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run:
|
||||
environment:
|
||||
|
|
@ -254,6 +271,7 @@ jobs:
|
|||
parallelism: 20
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run:
|
||||
environment:
|
||||
|
|
@ -281,6 +299,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_yarn_cache
|
||||
- *restore_node_modules
|
||||
- run:
|
||||
|
|
@ -299,6 +318,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_yarn_cache
|
||||
- *restore_node_modules
|
||||
- run:
|
||||
|
|
@ -326,6 +346,7 @@ jobs:
|
|||
- checkout
|
||||
- attach_workspace:
|
||||
at: packages/react-devtools-scheduling-profiler
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run:
|
||||
name: Deploy
|
||||
|
|
@ -344,6 +365,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
# This runs in the process_artifacts job, too, but it's faster to run
|
||||
# this step in both jobs instead of running the jobs sequentially
|
||||
|
|
@ -359,6 +381,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
# This runs in the process_artifacts job, too, but it's faster to run
|
||||
# this step in both jobs instead of running the jobs sequentially
|
||||
|
|
@ -374,6 +397,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn lint-build
|
||||
- run: scripts/circleci/check_minified_errors.sh
|
||||
|
|
@ -384,6 +408,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run:
|
||||
environment:
|
||||
|
|
@ -398,6 +423,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-stable --build --ci
|
||||
|
||||
|
|
@ -408,6 +434,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test --build --ci
|
||||
|
||||
|
|
@ -417,6 +444,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test --project=devtools --build --ci
|
||||
|
||||
|
|
@ -426,6 +454,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run:
|
||||
name: Run DOM fixture tests
|
||||
|
|
@ -442,6 +471,7 @@ jobs:
|
|||
environment: *environment
|
||||
steps:
|
||||
- checkout
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run:
|
||||
name: Run fuzz tests
|
||||
|
|
@ -456,6 +486,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test-stable --build --prod --ci
|
||||
|
||||
|
|
@ -466,6 +497,7 @@ jobs:
|
|||
steps:
|
||||
- checkout
|
||||
- attach_workspace: *attach_workspace
|
||||
- run: yarn workspaces info | head -n -1 > workspace_info.txt
|
||||
- *restore_node_modules
|
||||
- run: yarn test --build --prod --ci
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user