mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 12:20:20 +01:00
Speed up yarn cache in circle (#19566)
This commit is contained in:
parent
ce37bfad5f
commit
c8d9b8878a
|
|
@ -7,17 +7,11 @@ aliases:
|
||||||
- &environment
|
- &environment
|
||||||
TZ: /usr/share/zoneinfo/America/Los_Angeles
|
TZ: /usr/share/zoneinfo/America/Los_Angeles
|
||||||
|
|
||||||
- &restore_yarn_cache
|
- &restore_node_modules
|
||||||
restore_cache:
|
restore_cache:
|
||||||
name: Restore node_modules cache
|
name: Restore node_modules cache
|
||||||
keys:
|
keys:
|
||||||
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
|
- v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}-node-modules
|
||||||
- v2-node-{{ arch }}-{{ .Branch }}-
|
|
||||||
- v2-node-{{ arch }}-
|
|
||||||
- &run_yarn
|
|
||||||
run:
|
|
||||||
name: Install Packages
|
|
||||||
command: yarn --frozen-lockfile
|
|
||||||
|
|
||||||
- &TEST_PARALLELISM 20
|
- &TEST_PARALLELISM 20
|
||||||
|
|
||||||
|
|
@ -30,8 +24,7 @@ aliases:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: node ./scripts/rollup/consolidateBundleSizes.js
|
- run: node ./scripts/rollup/consolidateBundleSizes.js
|
||||||
- run: ./scripts/circleci/pack_and_store_artifact.sh
|
- run: ./scripts/circleci/pack_and_store_artifact.sh
|
||||||
- store_artifacts:
|
- store_artifacts:
|
||||||
|
|
@ -59,13 +52,29 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: Nodejs Version
|
name: Nodejs Version
|
||||||
command: node --version
|
command: node --version
|
||||||
- *restore_yarn_cache
|
- restore_cache:
|
||||||
- *run_yarn
|
name: Restore yarn cache
|
||||||
|
key: v2-node-{{ arch }}-{{ checksum "yarn.lock" }}-yarn
|
||||||
|
- run:
|
||||||
|
name: Install Packages
|
||||||
|
command: yarn --frozen-lockfile --cache-folder ~/.cache/yarn
|
||||||
- save_cache:
|
- save_cache:
|
||||||
name: Save node_modules cache
|
# Store the yarn cache globally for all lock files with this same
|
||||||
key: v2-node-{{ arch }}-{{ .Branch }}-{{ checksum "yarn.lock" }}
|
# checksum. This will speed up the setup job for all PRs where the
|
||||||
|
# lockfile is the same.
|
||||||
|
name: Save yarn cache for future installs
|
||||||
|
key: v2-node-{{ arch }}-{{ checksum "yarn.lock" }}-yarn
|
||||||
paths:
|
paths:
|
||||||
- ~/.cache/yarn
|
- ~/.cache/yarn
|
||||||
|
- save_cache:
|
||||||
|
# Store node_modules for all jobs in this workflow so that they don't
|
||||||
|
# need to each run a yarn install for each job. This will speed up
|
||||||
|
# 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
|
||||||
|
paths:
|
||||||
|
- node_modules
|
||||||
|
|
||||||
yarn_lint:
|
yarn_lint:
|
||||||
docker: *docker
|
docker: *docker
|
||||||
|
|
@ -73,8 +82,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: node ./scripts/prettier/index
|
- run: node ./scripts/prettier/index
|
||||||
- run: node ./scripts/tasks/eslint
|
- run: node ./scripts/tasks/eslint
|
||||||
- run: ./scripts/circleci/check_license.sh
|
- run: ./scripts/circleci/check_license.sh
|
||||||
|
|
@ -87,8 +95,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: node ./scripts/tasks/flow-ci
|
- run: node ./scripts/tasks/flow-ci
|
||||||
|
|
||||||
RELEASE_CHANNEL_stable_yarn_test:
|
RELEASE_CHANNEL_stable_yarn_test:
|
||||||
|
|
@ -98,8 +105,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=stable --ci
|
- run: yarn test --release-channel=stable --ci
|
||||||
|
|
||||||
yarn_test:
|
yarn_test:
|
||||||
|
|
@ -108,8 +114,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --ci
|
- run: yarn test --ci
|
||||||
|
|
||||||
RELEASE_CHANNEL_stable_yarn_test_www:
|
RELEASE_CHANNEL_stable_yarn_test_www:
|
||||||
|
|
@ -118,8 +123,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=www-classic --ci
|
- run: yarn test --release-channel=www-classic --ci
|
||||||
|
|
||||||
RELEASE_CHANNEL_stable_yarn_test_www_variant:
|
RELEASE_CHANNEL_stable_yarn_test_www_variant:
|
||||||
|
|
@ -128,8 +132,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=www-classic --variant --ci
|
- run: yarn test --release-channel=www-classic --variant --ci
|
||||||
|
|
||||||
RELEASE_CHANNEL_stable_yarn_test_prod_www:
|
RELEASE_CHANNEL_stable_yarn_test_prod_www:
|
||||||
|
|
@ -138,8 +141,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=www-classic --prod --ci
|
- run: yarn test --release-channel=www-classic --prod --ci
|
||||||
|
|
||||||
RELEASE_CHANNEL_stable_yarn_test_prod_www_variant:
|
RELEASE_CHANNEL_stable_yarn_test_prod_www_variant:
|
||||||
|
|
@ -148,8 +150,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=www-classic --prod --variant --ci
|
- run: yarn test --release-channel=www-classic --prod --variant --ci
|
||||||
|
|
||||||
yarn_test_www:
|
yarn_test_www:
|
||||||
|
|
@ -158,8 +159,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=www-modern --ci
|
- run: yarn test --release-channel=www-modern --ci
|
||||||
|
|
||||||
yarn_test_www_variant:
|
yarn_test_www_variant:
|
||||||
|
|
@ -168,8 +168,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=www-modern --variant --ci
|
- run: yarn test --release-channel=www-modern --variant --ci
|
||||||
|
|
||||||
yarn_test_prod_www:
|
yarn_test_prod_www:
|
||||||
|
|
@ -178,8 +177,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=www-modern --prod --ci
|
- run: yarn test --release-channel=www-modern --prod --ci
|
||||||
|
|
||||||
yarn_test_prod_www_variant:
|
yarn_test_prod_www_variant:
|
||||||
|
|
@ -188,8 +186,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=www-modern --prod --variant --ci
|
- run: yarn test --release-channel=www-modern --prod --variant --ci
|
||||||
|
|
||||||
RELEASE_CHANNEL_stable_yarn_test_persistent:
|
RELEASE_CHANNEL_stable_yarn_test_persistent:
|
||||||
|
|
@ -199,8 +196,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=stable --persistent --ci
|
- run: yarn test --release-channel=stable --persistent --ci
|
||||||
|
|
||||||
RELEASE_CHANNEL_stable_yarn_test_prod:
|
RELEASE_CHANNEL_stable_yarn_test_prod:
|
||||||
|
|
@ -210,8 +206,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=stable --prod --ci
|
- run: yarn test --release-channel=stable --prod --ci
|
||||||
|
|
||||||
yarn_test_prod:
|
yarn_test_prod:
|
||||||
|
|
@ -220,8 +215,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=experimental --prod --ci
|
- run: yarn test --release-channel=experimental --prod --ci
|
||||||
|
|
||||||
RELEASE_CHANNEL_stable_yarn_build:
|
RELEASE_CHANNEL_stable_yarn_build:
|
||||||
|
|
@ -230,8 +224,7 @@ jobs:
|
||||||
parallelism: *TEST_PARALLELISM
|
parallelism: *TEST_PARALLELISM
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run:
|
- run:
|
||||||
environment:
|
environment:
|
||||||
RELEASE_CHANNEL: stable
|
RELEASE_CHANNEL: stable
|
||||||
|
|
@ -257,8 +250,7 @@ jobs:
|
||||||
parallelism: 20
|
parallelism: 20
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run:
|
- run:
|
||||||
environment:
|
environment:
|
||||||
RELEASE_CHANNEL: experimental
|
RELEASE_CHANNEL: experimental
|
||||||
|
|
@ -285,8 +277,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run:
|
- run:
|
||||||
environment:
|
environment:
|
||||||
RELEASE_CHANNEL: experimental
|
RELEASE_CHANNEL: experimental
|
||||||
|
|
@ -305,8 +296,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
# This runs in the process_artifacts job, too, but it's faster to run
|
# 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
|
# this step in both jobs instead of running the jobs sequentially
|
||||||
- run: node ./scripts/rollup/consolidateBundleSizes.js
|
- run: node ./scripts/rollup/consolidateBundleSizes.js
|
||||||
|
|
@ -321,8 +311,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
# This runs in the process_artifacts job, too, but it's faster to run
|
# 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
|
# this step in both jobs instead of running the jobs sequentially
|
||||||
- run: node ./scripts/rollup/consolidateBundleSizes.js
|
- run: node ./scripts/rollup/consolidateBundleSizes.js
|
||||||
|
|
@ -337,8 +326,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn lint-build
|
- run: yarn lint-build
|
||||||
- run: scripts/circleci/check_minified_errors.sh
|
- run: scripts/circleci/check_minified_errors.sh
|
||||||
|
|
||||||
|
|
@ -348,8 +336,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run:
|
- run:
|
||||||
environment:
|
environment:
|
||||||
RELEASE_CHANNEL: stable
|
RELEASE_CHANNEL: stable
|
||||||
|
|
@ -363,8 +350,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=stable --build --ci
|
- run: yarn test --release-channel=stable --build --ci
|
||||||
|
|
||||||
yarn_test_build:
|
yarn_test_build:
|
||||||
|
|
@ -374,8 +360,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=experimental --build --ci
|
- run: yarn test --release-channel=experimental --build --ci
|
||||||
|
|
||||||
yarn_test_build_devtools:
|
yarn_test_build_devtools:
|
||||||
|
|
@ -384,8 +369,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --project=devtools --build --ci
|
- run: yarn test --project=devtools --build --ci
|
||||||
|
|
||||||
RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
|
RELEASE_CHANNEL_stable_yarn_test_dom_fixtures:
|
||||||
|
|
@ -394,7 +378,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- run:
|
- run:
|
||||||
name: Run DOM fixture tests
|
name: Run DOM fixture tests
|
||||||
environment:
|
environment:
|
||||||
|
|
@ -410,8 +394,7 @@ jobs:
|
||||||
environment: *environment
|
environment: *environment
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run:
|
- run:
|
||||||
name: Run fuzz tests
|
name: Run fuzz tests
|
||||||
command: |
|
command: |
|
||||||
|
|
@ -425,8 +408,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=stable --build --prod --ci
|
- run: yarn test --release-channel=stable --build --prod --ci
|
||||||
|
|
||||||
yarn_test_build_prod:
|
yarn_test_build_prod:
|
||||||
|
|
@ -436,8 +418,7 @@ jobs:
|
||||||
steps:
|
steps:
|
||||||
- checkout
|
- checkout
|
||||||
- attach_workspace: *attach_workspace
|
- attach_workspace: *attach_workspace
|
||||||
- *restore_yarn_cache
|
- *restore_node_modules
|
||||||
- *run_yarn
|
|
||||||
- run: yarn test --release-channel=experimental --build --prod --ci
|
- run: yarn test --release-channel=experimental --build --prod --ci
|
||||||
|
|
||||||
workflows:
|
workflows:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user