12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- defaults: &defaults
- working_directory: ~/code
- docker:
- - image: circleci/node:12.9.1-browsers
-
- version: 2
- jobs:
- setup:
- <<: *defaults
- steps:
- - checkout
- - restore_cache:
- name: Restore node modules
- keys:
- - node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
-
- - run:
- name: Install dependencies
- command: yarn --pure-lockfile
-
- - save_cache:
- name: Save node modules
- key: node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
- paths:
- - node_modules
-
- tests:
- <<: *defaults
- steps:
- - checkout
- - restore_cache:
- name: Restore node modules
- keys:
- - node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
-
- - run:
- name: Run Tests
- command: yarn ci
-
- publish:
- <<: *defaults
- steps:
- - checkout
- - restore_cache:
- name: Restore node modules
- keys:
- - node_modules-{{ arch }}-{{ checksum "yarn.lock" }}
-
- - run:
- name: Publish to NPM
- command: yarn ci:publish
-
- workflows:
- version: 2
- ci:
- jobs:
- - setup
- - tests:
- requires:
- - setup
- - publish:
- requires:
- - tests
- filters:
- branches:
- only: master
|