Skip to content

Commit

Permalink
npm->yarn for various steps and tasks
Browse files Browse the repository at this point in the history
  • Loading branch information
blowery committed Feb 11, 2020
1 parent 4bc8bc5 commit a6071b9
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,9 @@ references:
paths:
- '.git'

# npm cache
# yarn cache
#
# npm caches the modules it installs in ~/.npm.
# yarn caches the modules it installs in ~/.cache/yarn.
# We cache that cache to save time pulling modules from the network.
#
#
Expand All @@ -111,26 +111,26 @@ references:
# - https://github.com/Automattic/wp-calypso/pull/25487
# - https://github.com/Automattic/wp-calypso/pull/27180
#
# More about the CircleCI cache: https://circleci.com/docs/2.0/caching
restore-npm-cache: &restore-npm-cache
name: 'Restore npm cache'
# More about the CircleCI cache: https://circleci.com/docs/2.0/caching and https://circleci.com/docs/2.0/yarn/
restore-yarn-cache: &restore-yarn-cache
name: 'Restore yarn cache'
keys:
- v{{ .Environment.GLOBAL_CACHE_PREFIX }}-node-modules-{{ checksum ".nvmrc" }}-{{ checksum "yarn.lock" }}
- v{{ .Environment.GLOBAL_CACHE_PREFIX }}-node-modules-{{ checksum ".nvmrc" }}
- v{{ .Environment.GLOBAL_CACHE_PREFIX }}-yarn-modules-{{ checksum ".nvmrc" }}-{{ checksum "yarn.lock" }}
- v{{ .Environment.GLOBAL_CACHE_PREFIX }}-yarn-modules-{{ checksum ".nvmrc" }}

npm-install: &npm-install
yarn-install: &yarn-install
environment:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: "true"
name: Install dependencies
command: yarn install --immutable

save-npm-cache: &save-npm-cache
name: 'Save node_modules cache'
key: v{{ .Environment.GLOBAL_CACHE_PREFIX }}-node-modules-{{ checksum ".nvmrc" }}-{{ checksum "yarn.lock" }}
save-yarn-cache: &save-yarn-cache
name: 'Save yarn cache'
key: v{{ .Environment.GLOBAL_CACHE_PREFIX }}-yarn-modules-{{ checksum ".nvmrc" }}-{{ checksum "yarn.lock" }}
paths:
- ~/.cache/yarn
npm-e2e-install: &npm-e2e-install
name: Install e2e npm dependencies
yarn-e2e-install: &yarn-e2e-install
name: Install e2e yarn dependencies
command: |
cd test/e2e &&
CHROMEDRIVER_VERSION=$(<.chromedriver_version) yarn install --immutable
Expand Down Expand Up @@ -196,11 +196,11 @@ jobs:
- checkout
- run: *update-git-master
- save_cache: *save-git-cache
# npm dependencies
- restore_cache: *restore-npm-cache
- run: *npm-install
- run: *npm-e2e-install
- save_cache: *save-npm-cache
# yarn dependencies
- restore_cache: *restore-yarn-cache
- run: *yarn-install
- run: *yarn-e2e-install
- save_cache: *save-yarn-cache
- run: yarn run build-packages
- persist_to_workspace:
root: '~'
Expand Down

0 comments on commit a6071b9

Please sign in to comment.