Yield generated for d81f815a-8540-4fd7-ac8d-fb32c4bb61c8
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

54 lines
1.3 KiB

version: 2.1
jobs:
build:
docker:
- image: circleci/node:dubnium-browsers
steps:
- checkout
- restore_cache:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
- yarn-packages
- run: yarn global add node-gyp && yarn install
- save_cache:
key: yarn-packages-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
paths:
- node_modules
test:
docker:
- image: circleci/node:dubnium-browsers
steps:
- checkout
- restore_cache:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
- run:
command: yarn test
prod:
docker:
- image: circleci/node:dubnium-browsers
steps:
- checkout
- restore_cache:
keys:
- yarn-packages-{{ checksum "yarn.lock" }}-{{ .Environment.CACHE_VERSION }}
- run:
command : yarn run build
- run:
command: |
cp dist/ /tmp/dist -r
- store_artifacts:
path: /tmp/dist
- persist_to_workspace:
root: /tmp
paths:
- dist
workflows:
build_and_test:
jobs:
- build
- prod:
requires:
- build