Skip to content

Instantly share code, notes, and snippets.

@manakuro
Created February 27, 2020 00:45
Show Gist options
  • Save manakuro/3d31f09bc832dbde868068f8ae0a9945 to your computer and use it in GitHub Desktop.
Save manakuro/3d31f09bc832dbde868068f8ae0a9945 to your computer and use it in GitHub Desktop.
version: 2.1
executors:
default:
docker:
- image: circleci/node:12
working_directory: ~/my-app
commands:
restore_yarn:
steps:
- restore_cache:
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}-{{ .Branch }}
save_yarn:
steps:
- save_cache:
key: yarn-v1-{{ checksum "yarn.lock" }}-{{ arch }}-{{ .Branch }}
paths:
- ~/.cache/yarn
restore_node:
steps:
- restore_cache:
key: node-v1-{{ checksum "package.json" }}-{{ arch }}-{{ .Branch }}
save_node:
steps:
- save_cache:
key: node-v1-{{ checksum "package.json" }}-{{ arch }}-{{ .Branch }}
paths:
- node_modules
jobs:
node:
executor:
name: default
steps:
- checkout
- restore_yarn
- restore_node
- run: yarn
- save_yarn
- save_node
workflows:
build:
jobs:
- node
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment